in reply to Re: Changing the output filehandle while iterating input files.
in thread Changing the output filehandle while iterating input files.
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.
|
|---|