Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: How to remove the words before the dot using perl?

by nysus (Parson)
on Mar 16, 2017 at 05:07 UTC ( [id://1184824]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1184824]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-16 18:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found