Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Pop/shift/delete on array

by monarch (Priest)
on Jul 14, 2005 at 08:34 UTC ( #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
Node Status?
node history
Node Type: note [id://474795]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2019-10-20 22:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?