Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

RE: Array One-liners

by merlyn (Sage)
on Sep 24, 2000 at 18:44 UTC ( #33847=note: print w/replies, xml ) Need Help??


in reply to Array One-liners

splice @array, 0, 0, splice(@array, rand @array);
Good stuff, but typically we spell that:
unshift @array, splice @array, rand @array;
splice is cool, but you don't need to use it for the common thingies.

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2021-02-25 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?