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 reply to Re^2: Changing the output filehandle while iterating input files.
by betterworld
in thread Changing the output filehandle while iterating input files.
by reedx032
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |