Its more like pulling over when you get nailed, then you get out, fix your tire. | [reply] [Watch: Dir/Any] |
| [reply] [Watch: Dir/Any] [d/l] [select] |
Well, what most people ranting about magic open say is that files ending in '|' get created either by accident, or they are there to try to exploit something. In such cases, I would like to see the files removed; I rather have my filter stop and complain in stead of silently processing the file and leaving the potential exploit there.
Now, if you actually want to have files that start with '<', '>', '|' or whitespace, or end with '|' or whitespace, then you are in for a lot of suffering - not just from Perl, but from the shell as well. But still, Perl has a documented solution (see for instance, 'perlopentut'):
BEGIN {s!^(\s)!./$1!,s/^/</,s/$/\0/ for @ARGV}
Yes, and that works with -i as well. | [reply] [Watch: Dir/Any] [d/l] |