Hello Eily, I use Path::Tiny for almost all the file things.
$ rm foo* bar* $ echo foo > foo $ echo bar > bar
$ perl -MPath::Tiny -wnE 'sub baz {uc} chomp; my $in = path($_); $in-> +sibling("$_.new")->spew(baz($in->slurp));' foo bar
$ cat foo.new FOO $ cat bar.new BAR
Hope this helps!
In reply to Re: One to one file output idiom
by 1nickt
in thread One to one file output idiom
by Eily
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |