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

Just delete the extension at the end of the name.
$approvedpdfs =~ s/\.pdf$//;
You could find File::Spec useful for this filename stuff, anyway.

Update: you should also take a look at perldoc perlretut, regexes aren't shell expansion rules :)

Flavio

Don't fool yourself.

Replies are listed 'Best First'.
Re^2: using s/// to remove file extensions
by nimdokk (Vicar) on Mar 30, 2005 at 13:33 UTC
    File::Basename might also be useful. Its got info on parsing out filenames (directories, basenames and extensions). I use the fileparse function to break apart the file name for renaming purposes.