in reply to Re: Problem with appending files
in thread Problem with appending files
in my actual code
open (FD,">>OTAPA_Errors"); foreach my $num (@errors) { if ($flag == 1) { print FD $/,$num; } if ($flag ==0) { print FD $num; $flag = 1; } }
If I run this sometimes a new line is added at the starting. So i removed new line by using flag. But some times the new line missing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Problem with appending files
by choroba (Cardinal) on Jan 21, 2016 at 14:00 UTC | |
|
Re^3: Problem with appending files
by hdb (Monsignor) on Jan 21, 2016 at 13:47 UTC | |
by ravi45722 (Pilgrim) on Jan 21, 2016 at 14:12 UTC | |
|
Re^3: Problem with appending files
by Corion (Patriarch) on Jan 21, 2016 at 13:33 UTC |