Mercurial > repos > anmoljh > activity_files_merge
comparison merge_activity_files.pl @ 0:b06d2e06b740 draft
planemo upload commit a1f4dd8eb560c649391ada1a6bb9505893a35272
author | anmoljh |
---|---|
date | Thu, 31 May 2018 11:24:57 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b06d2e06b740 |
---|---|
1 #!/usr/bin/perl | |
2 use warnings; | |
3 use strict; | |
4 open(FH,$ARGV[0]) or die "Couldn't open file, $!"; | |
5 open(DH,">$ARGV[4]") 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; |