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

Re: Trying to convert shell script to Perl

by DamnDirtyApe (Curate)
on Aug 05, 2002 at 22:33 UTC ( [id://187850]=note: print w/replies, xml ) Need Help??


in reply to Trying to convert shell script to Perl

For a more Perl-ish version, try something like this...

use Cwd ; my $curr_dir = cwd ; opendir DIR , $curr_dir ; for my $DIR ( grep { /^[a-k]/ || /^lts$/ || /^mon$/ || /^[n-z]/ } readdir( DIR ) ) { if ( -d "$DIR/bld" ) { chdir "$DIR/bld" ; system 'cbsfpfg.exe', ( 'cbs' . $DIR . $RELEASE ), $DIR ; chdir $curr_dir ; } } closedir DIR ;

_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-26 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found