http://www.perlmonks.org?node_id=1038904


in reply to how to redirect output in different files

for %f in (*.txt) do @yourscript.pl %f

Try it like this:

perl -i -pe's/\s+/\n/g' *.txt

Replies are listed 'Best First'.
Re^2: how to redirect output in different files
by choroba (Cardinal) on Jun 14, 2013 at 07:18 UTC
    That would require changing $ARGV[0] to shift also.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ