Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Golf/Perlish solution to this problem?

by ikegami (Patriarch)
on Jan 31, 2008 at 02:38 UTC ( [id://665265]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub a { @_<2 ? @_ : (pop,shift,&b) }
    sub b { @_<2 ? @_ : (shift,pop,&a) }
    print a(1..8), "\n";
    
  2. or download this
    sub a { @_ ? (@_[-1,0,1,-2],a(@_[2..$#_-2])) : () }
    print a(1..8), "\n";
    
  3. or download this
    sub a { @_ ? (pop,shift,shift,pop,&a) : () }
    print a(1..8), "\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-26 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found