in reply to Re: Re: file name parsing to get the original file name
in thread file name parsing to get the original file name

Wouldn't it be easier just to do:

$path=~/.*\/(.*)$/;$name=$1;

Basically nuke everything in the way and grab what's left??

  • Comment on Re^3: file name parsing to get the original file name

Replies are listed 'Best First'.
Re^4: file name parsing to get the original file name
by MarkM (Curate) on Dec 13, 2012 at 23:55 UTC
    The check:
    $path=~/.*\/(.*)$/;$name=$1; 
    
    Doesn't take into account that the path might *not* have a directory component...