Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: array

by ichimunki (Priest)
on Jul 18, 2002 at 20:32 UTC ( #183039=note: print w/replies, xml ) Need Help??


in reply to Re: array
in thread Getting last value in array

Sara/DS/Amoura/whatever, the pop(@array) function is destructive. It will remove the last element from the array (just as shift will remove the first element), it is therefore not a good substitute for $array[-1] under most circumstances. If you don't mind that your array will now be incomplete pop away. :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2016-09-26 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (478 votes). Check out past polls.