in reply to Where is my output stream to a file going?
a module like Text::Table can give you control over how your data is placed in columns without breaking your head on spacing issues...my $path = "C:/Documents and Settings/aldaihi/Desktop/Monks"; open (my $fh, '<',"$path/genes.txt") or die ("could not open file $!\n +"); open (my $rfh,'>',"$path/results.txt") or die ("could not open file $! +\n"); my $firstLine = <$fh>; print $rfh $firstLine; while(<$fh>){ chomp; if(/(?=Withdrawn)/i){ #U can do things to the line in here #..... # split or rearrange .. # print $rfh $_,"\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Where is my output stream to a file going?
by lomSpace (Scribe) on Mar 30, 2011 at 15:08 UTC | |
by davido (Cardinal) on Mar 30, 2011 at 16:40 UTC |