my @audiofiles = grep { /([^\.]+)\.ram/i } readdir DH;
...gives me audiofile1.ram, audiofile2.ram, audiofile3.ram, etc. into the array.
What I'd like to get is audiofile1, audiofile2, audiofile3 instead, with no file extensions. Shouldn't the parentheses in my reg exp be doing this for me? What am I missing?
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar";
$nysus = $PM . $MCF;
In reply to Grabbing file prefixes with Reg Exp by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |