Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Execute a for loop in many subdirectories

by marlowvoltron (Novice)
on May 22, 2014 at 20:34 UTC ( [id://1087135]=note: print w/replies, xml ) Need Help??


in reply to Re: Execute a for loop in many subdirectories
in thread Execute a for loop in many subdirectories

The depth is only 1, I don't need to go deeper than /antarctica/*

Replies are listed 'Best First'.
Re^3: Execute a for loop in many subdirectories
by runrig (Abbot) on May 22, 2014 at 21:04 UTC
    The depth is only 1, I don't need to go deeper than /antarctica/*
    No need for File::Find then:
    my @dirs = grep -d, </antarctica/*>; for my $dir (@dirs) { chdir($dir) or die "Failed to chdir to $dir: $!"; execute_something(); }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-04-18 02:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found