NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Beware of strange characters... (Score:1)
You might not want to use
sprintfand the string form of pipeopen. Think what happens when you get a file name containing spaces, or asterisks, or pipe characters, or anything else that's special to the shell (yes, I actually had such names: one of my applications used TT2 to generate documents, and the file names themselves were expanded by TT2, so I had names like[% customer.name | filename %] - [% orders.last_number | format('%04d') %].txt)I'd suggest doing what
find'sexecoption does: gobble up all parameters up to a literal;, and substitute the filename in place of a literal{}.Reply to This