Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Golf/Perlish solution to this problem?

by ikegami (Pope)
on Jan 31, 2008 at 02:38 UTC ( #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
Node Status?
node history
Node Type: note [id://665265]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2021-01-15 22:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?