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

Re: rand + shift || pop

by Anonymous Monk
on Dec 21, 2010 at 15:24 UTC ( [id://878285]=note: print w/replies, xml ) Need Help??


in reply to rand + shift || pop

perldoc -f splice
$ perl -MDDS -e " @f = 1..3; Dump(\@f); warn splice @f, rand(@f),1; Du +mp( \@f )" $ARRAY1 = [ 1, 2, 3 ]; 1 at -e line 1. $ARRAY1 = [ 2, 3 ];

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2025-07-07 23:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.