http://qs1969.pair.com?node_id=764574


in reply to Re^3: multiple file operations using perl one-liners
in thread multiple file operations using perl one-liners

Is there any advantage to this variant? It's longer and buggy (missing chomp). It's also less clear due the weird use of => to separate two of three arguments, especially when it's also used to associate the arguments to the command.

Either way, I just realised du is useless.

perl -e'system zip => "-d", $_, "*exe*" for @ARGV' */*/old.zip

Replies are listed 'Best First'.
Re^5: multiple file operations using perl one-liners
by jwkrahn (Abbot) on May 18, 2009 at 06:00 UTC

    TMTOWTDI    ;-)

    perl -e'system "zip", "-d", $_, "*exe*" for <*/*/old.zip>'
      That fails for paths with spaces. That may not be a problem for the OP, but it would be for me.