Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: untarring number of files

by zakzebrowski (Curate)
on Oct 23, 2003 at 12:18 UTC ( #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
Node Status?
node history
Node Type: note [id://301552]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2020-07-13 14:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?