Saturday, December 18, 2010

remove file extension

$file="file.name.extension";

$file =~ s/(.*)\./$1/;
##or
$file =~ s/\.[^.]*$//;

will return you $file="file.name";

No comments: