in reply to Re^2: How to remove the words before the dot using perl?
in thread How to remove the words before the dot using perl?

I'm not sure what you are saying but if you are just looking to do this on one scalar variable, get rid of the loop and replace $file with your variable:

print ((split /\./, $your_variable)[-1] . "\n") ;

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks