in reply to Another Regular Expression Question

this has been done before, so instead of showing you a regular expression i'll show you this:
use File::Basename; my ($name,$path,$suffix) = fileparse($path, qr/\..*/);
this is easier and more portable than a regex.
(update: ok, the suffixlist in fileparse indeed is a regex, but no need to care about slashes or other delimiters in the path)

Replies are listed 'Best First'.
Re: Re: Another Regular Expression Question
by Scarborough (Hermit) on Apr 08, 2004 at 15:05 UTC
    Thank you for your help I will start using right away.