Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Problem in printing lastname and firstname

by smokemachine (Hermit)
on Nov 21, 2006 at 11:45 UTC ( [id://585236] : note . print w/replies, xml ) Need Help??


in reply to Problem in printing lastname and firstname

perl -e 'chomp($name=<>); $,=", ";print ((split/ /,$name)[-1,0])'