Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Knob Re: Parse out the extension of a filename - return base of filename.by knobunc (Pilgrim) |
on Mar 13, 2002 at 14:43 UTC ( [id://151386]=note: print w/replies, xml ) | Need Help?? |
Umm.. try running the example he gave (or reading the node more closely). It does match the last part of the filename following the final dot. So if you run:
It produces foo.bar as the filename, ./ as the directory and baz as the extension. A few more filenames and results follow:
-ben
In Section
Cool Uses for Perl
|
|