good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Re: Re: system, pipes, shell, quotingby superpete (Beadle) |
on Nov 14, 2002 at 05:39 UTC ( [id://212769]=note: print w/replies, xml ) | Need Help?? |
ok I'll bite. I quickly read Ovid's tutorial. Anyhow, I made a solution that combines some of the suggestions in this discussion, and SAFELY uses the shell for truly arbitrary filenames.
Let me know if you can break it, I actually think I got it right (famous last words)
I tested this successfully on a randomly generated directory tree full of randomly-generated filenames made up of chr(rand(128)) except "/" and "\0". Actually, $prog1, $file1, etc can have "/" in them because they might be pathnames.
In Section
Seekers of Perl Wisdom
|
|