Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: split string using optimized code or perl one liner (updated)

by haukex (Archbishop)
on Feb 22, 2017 at 14:11 UTC ( [id://1182527]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ echo abc.def.ghi.jkl.mno | \
      perl -lne 'print join ".", reverse split /\./'
    mno.jkl.ghi.def.abc
    
  2. or download this
    $ echo abc.def.ghi.jkl.mno | \
      perl -F'\.' -lpe'$_=join".",reverse@F'
    mno.jkl.ghi.def.abc
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found