Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: popping, shifting or splicing an array???

by shiza (Hermit)
on Aug 09, 2005 at 17:33 UTC ( #482325=note: print w/replies, xml ) Need Help??

in reply to popping, shifting or splicing an array???

Since you are dealing with numbers you could just set the value of an array element to its' index. Instead of getting rid of a selected value, you could set it equal to undef when selected.

A benefit to doing this way would be the minute amount of code needed to maintain your array.

This is probably not the best way to handle this programatically, but it would work.

I'm sure there are a lot of arguments against doing it this way and am interested in hearing them.
  • Comment on Re: popping, shifting or splicing an array???

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2023-01-27 01:35 GMT
Find Nodes?
    Voting Booth?

    No recent polls found