Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)

by shmem (Canon)
on Dec 12, 2006 at 15:09 UTC ( #589293=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub reverseWords {
        "@{[reverse split' ',shift]}"
    }
    
  2. or download this
    sub reverseWords {
        "@{[reverse shift=~/\S+/g]}"
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2015-07-04 21:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls