Help for this page
# expecting that $file has file name. open (INF,"$file") or die "Unable to open \'$file\': $!"; open (OUTF,".temp_file") or die "Unable to create temp file: $!"; ... print OUTF "$_"; } rename (".temp_file","$file");
# remove all the character after last dot $line=~s/\.\w+$//o;