Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Delete/Add a string in an array

by mantadin (Beadle)
on Apr 25, 2006 at 05:35 UTC ( [id://545476]=note: print w/replies, xml ) Need Help??


in reply to Re: Delete/Add a string in an array
in thread Delete/Add a string in an array

my @arr = ( "foo", "bar" ); print @arr, "\n"; # append a scalar push @arr, "post"; print @arr, "\n"; # and remove it again my $s = pop @arr; print "== popped the last one: $s ==\n"; print @arr, "\n"; # prepend a scalar unshift @arr, "pre"; print @arr, "\n"; # and remove it my $t = shift @arr; print "== shifted the first one: $t ==\n"; print @arr, "\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (9)
As of 2024-04-23 17:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found