Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Need some data structures cooked

by petral (Curate)
on Nov 21, 2002 at 15:55 UTC ( #214798=note: print w/replies, xml ) Need Help??


in reply to Re: Need some data structures cooked
in thread Need some data structures cooked

Well cooked!  Oddly enough, all you need is:    splice @{$vips{$k}{'stack'}}, 0, -50;
It will leave the array untouched if it is not greater than 50.
$ perldoc -f splice . . . If LENGTH is negative, leaves that many elements off the end of the + array.
(I guess they mean "off the deleted array" -- at all events, that's how it works (and also what makes sense).  It's explained clearly here!)

  p

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2020-01-21 04:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?