NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

Replies are listed 'Best First'.
Re: Search a string from beginning or end
by dmmiller2k (Chaplain) on Dec 28, 2001 at 03:22 UTC
Re: Search a string from beginning or end
by chipmunk (Parson) on Dec 28, 2001 at 07:08 UTC
    Instead of basename, you could use fileparse, which is also part of the File::Basename module. For example: ($base,$path,$suffix) = fileparse($file, '\.[^.]*');