Saved has asked for the wisdom of the Perl Monks concerning the following question:
Is there a slick way to get just the a-z{3} chars from this?
my @eFILES = grep { (!/^\./) && (/^env\.[a-z]{3}$/) && (!/^env\.fix$/) +&& -f "$LIBDIR/$_" } readdir(LDIR);
Or do I need to put it thru a loop to remove "env." Thanx
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: grep & take part of match
by toolic (Bishop) on Jun 28, 2012 at 20:13 UTC | |
|
Re: grep & take part of match
by Perlbotics (Archbishop) on Jun 28, 2012 at 21:03 UTC | |
|
Re: grep & take part of match
by jwkrahn (Abbot) on Jun 29, 2012 at 01:24 UTC |