There's more than one way to do things | |
PerlMonks |
Re^2: Changing the output filehandle while iterating input files.by betterworld (Curate) |
on Sep 21, 2008 at 10:52 UTC ( [id://712836]=note: print w/replies, xml ) | Need Help?? |
In your example, "out*" will be the original file, while in the OP's code, "out*" will be the new file. Otherwise they are equivalent. Update: And please note that errors are not checked in either case. Imho a big problem with the "-p" switch is that it does not check whether writing and closing is successful.
In Section
Seekers of Perl Wisdom
|
|