Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: delete n elements of an array

by jwkrahn (Monsignor)
on Nov 25, 2012 at 13:03 UTC ( #1005484=note: print w/ replies, xml ) Need Help??


in reply to delete n elements of an array

$ perl -le' my @array = 1 .. 20; print "@array"; splice @array, 0, 15; print "@array"; ' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 16 17 18 19 20


Comment on Re: delete n elements of an array
Download Code
Re^2: delete n elements of an array
by Anonymous Monk on Nov 25, 2012 at 13:11 UTC

    Thanks monk, 1 more doubt. what should I do if I want to Pop 15 elements, ie, from last I want to cut. Thanks in advance.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2014-08-21 16:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (138 votes), past polls