Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: untarring number of files

by zakzebrowski (Curate)
on Oct 23, 2003 at 12:18 UTC ( [id://301552]=note: print w/replies, xml ) Need Help??


in reply to untarring number of files

Try something, completly different...
If you don't understand this, do a perldoc File::Find
use File::Find; find (\&doSomething,'.'); # Find stuff in curr dir, execute subroutine + do something on match. (\&[name] is a subroutine pointer... ) exit(0); # not needed sub doSomething{ my $fn = $_; # also not needed but makes life easy if ((!(-d $fn)) && ($fn =~/tar$/i)){ # -d test not really necessary system("tar","-xvf",$fn); # May want to do a which tar if it doesn +'t work ... } }
Caveat: Untested.


----
Zak
undef$/;$mmm="J\nutsu\nutss\nuts\nutst\nuts A\nutsn\nutso\nutst\nutsh\ +nutse\nutsr\nuts P\nutse\nutsr\nutsl\nuts H\nutsa\nutsc\nutsk\nutse\n +utsr\nuts";open($DOH,"<",\$mmm);$_=$forbbiden=<$DOH>;s/\nuts//g;print +;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://301552]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-24 14:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found