Mercurial > repos > deepakjadmin > padel_descriptors_test1
comparison tool2/addact.pl.copy @ 4:1b8c54b9de55 draft
Uploaded
| author | deepakjadmin |
|---|---|
| date | Wed, 06 Jan 2016 09:14:21 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 3:64c804de0681 | 4:1b8c54b9de55 |
|---|---|
| 1 #!/usr/bin/perl | |
| 2 use warnings; | |
| 3 use strict; | |
| 4 open(FH,$ARGV[0]) or die "Couldn't open file, $!"; | |
| 5 open(DH,">tmp.txt") or die "Couldn't open file, $!"; | |
| 6 my $first_line = scalar <FH>; | |
| 7 chomp($first_line); | |
| 8 $first_line = join(",",$first_line,"outcome\n"); | |
| 9 print DH $first_line; | |
| 10 while(<FH>){chomp($_); | |
| 11 my $line= join(",",$_,"$ARGV[1]\n"); | |
| 12 print DH $line; | |
| 13 } | |
| 14 close FH; | |
| 15 open(SH,$ARGV[2]) or die "Coudn't open file,$!"; | |
| 16 scalar <SH>; | |
| 17 while(<SH>){ | |
| 18 if($ARGV[1] ne $ARGV[3]){chomp($_); | |
| 19 my $line1= join(",",$_,"$ARGV[3]\n"); | |
| 20 print DH $line1; | |
| 21 } | |
| 22 else{ print ("There is error to assign activity\n");exit;} | |
| 23 } | |
| 24 close SH; | |
| 25 close DH; |
