Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Coming across an issue with glob. Is only able to find every other directory.

by jwkrahn (Abbot)
on Jul 07, 2013 at 06:05 UTC ( [id://1042971]=note: print w/replies, xml ) Need Help??


in reply to Coming across an issue with glob. Is only able to find every other directory.

You should use glob like this:

my $UNIT_DIR = '/home/vize/units'; # Get all units in $UNIT_DIR foreach my $moving_code_dir ( <$UNIT_DIR/*/moving_code_*> ) { my $moving_code = ( split '/', $moving_code_dir )[ -1 ]; if ( $moving_code_dir ) { print "$unit good\n"; } else { print "$unit bad\n"; } }
  • Comment on Re: Coming across an issue with glob. Is only able to find every other directory.
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-19 21:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found