Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Pop/shift/delete on array

by monarch (Priest)
on Jul 14, 2005 at 08:34 UTC ( [id://474795]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      my @vals = ( 'cat', 'dog', 'mouse' );
    
  2. or download this
      push( @vals, 'tiger' );
      print( join(',',@vals ) );
    
  3. or download this
      print( pop( @vals ) );
    
  4. or download this
      print( shift( @vals ) );
    
  5. or download this
      print( join(',',@vals ) );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found