in reply to Re^5: inserting array of data into text file
in thread inserting array of data into text file
print "Testing File:\n"; $file = <STDIN>; print "Output File:\n"; $file2 = <STDIN>; open (FILE, "<$file"); open (OUT, ">TRUE_OUTPUTS"); open (FILE2, "<$file2"); open (OUT2, ">COMPARE"); while (<FILE>) { if ($_ =~ m/^\d\s+\d/) {print OUT $_} } while (<FILE2>) { push @col, $_ =~ m/(\S+\s+\S+)/; } close(COL); print (OUTPUT @col); $size = scalar @col; print $size; open(COL, "<TRUE_OUTPUTS"); while(<COL>) { $_ =~ s/^(\S\s+\S)/$1 $col[$i++]/; print OUT2 $_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: inserting array of data into text file
by dragonchild (Archbishop) on Jul 13, 2004 at 15:25 UTC | |
by Anonymous Monk on Jul 13, 2004 at 15:42 UTC | |
by dragonchild (Archbishop) on Jul 13, 2004 at 15:50 UTC | |
by Anonymous Monk on Jul 13, 2004 at 20:03 UTC | |
by dragonchild (Archbishop) on Jul 13, 2004 at 20:16 UTC | |
|
Re^7: inserting array of data into text file
by ysth (Canon) on Jul 13, 2004 at 18:35 UTC | |
by Anonymous Monk on Jul 13, 2004 at 20:46 UTC | |
by ysth (Canon) on Jul 13, 2004 at 20:54 UTC | |
by Anonymous Monk on Jul 13, 2004 at 21:10 UTC | |
by ysth (Canon) on Jul 13, 2004 at 21:28 UTC |