in reply to regex to return file extensions

something like
$file=~/\.(\w+)$/;
would probably do the trick.

Replies are listed 'Best First'.
Re: Re: regex to return file extensions
by Anonymous Monk on Apr 02, 2004 at 08:26 UTC
    \z except when the extension ends in a newline :)