Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
while(<DATAOUT>) {
attempts to read from DATAOUT, which you just opened for writing only. As a result, the test (successful read from DATAOUT) fails and the body of your while is not executed. If you had use warnings;, you would have been told that DATAOUT was open only for output. You don't need that while loop, the for loop will do the job you want done. You should always It's also a GoodIdea to open(FH, ....) or die "error opening FH: $!";
In reply to Re^5: Sort log file alphabetically
by broomduster
|
|