in reply to using s/// to remove file extensions

How about using split instead?

($fName, $extension) = split (/\./, $FullFileName); print scalar $fName;

Replies are listed 'Best First'.
Re^2: using s/// to remove file extensions
by FitTrend (Pilgrim) on Mar 30, 2005 at 13:31 UTC

    Of course I'm assuming all files don't have extra periods in them. A module may be best, unless you know what kind of files to expect consistantly.