Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: [splice], explanation please?

by nothingmuch (Priest)
on Nov 16, 2002 at 07:16 UTC ( #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? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2022-12-05 20:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?