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

Re: [splice], explanation please?

by nothingmuch (Priest)
on Nov 16, 2002 at 07:16 UTC ( [id://213371]=note: print w/replies, xml ) Need Help??


in reply to [splice], explanation please?

There's always perlfunc... splice takes an array for the first argument, and then removes 3rd argument elements from the 2nd argument and on, replacing them with the list in the 4th - inf argument, and returning the extracted list.
my @array = qw(i do not like carrot); print "@array\n"; # you know; my @carrot = splice(@array,2,3,(qw(mow the lawn))); print "@array but @carrot\n";


-nuffin
zz zZ Z Z #!perl

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 09:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found