in reply to untarring number of files
What error message do you get? We need more specifics to help you.
Also, you can change your call to ls to use Perl's globbing operator instead:
@list = <*.tar>;
And you can use Archive::Tar instead of calling tar:
foreach $file (@list) { use Archive::Tar; $tar = Archive::Tar->new; $tar->read( $file ); $tar->extract(); }
Pure Perl solutions are generally faster and safer than calling external programs, though perhaps a bit longer in some cases.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
:(){ :|:&};:
Note: All code is untested, unless otherwise stated
|
|---|