Syntactic Confectionery Delight | |
PerlMonks |
Re: Grabbing file prefixes with Reg Expby MrNobo1024 (Hermit) |
on May 13, 2001 at 20:19 UTC ( [id://80048]=note: print w/replies, xml ) | Need Help?? |
grep returns the whole filenames, not just a parenthesized group. I think what you want is
my @audiofiles = map { /([^\.]+)\.ram/i ? $1 : () } readdir DH;
In Section
Seekers of Perl Wisdom
|
|