[Chicago-talk] Removing an element from an array

Mike Demir mdemir3000 at gmail.com
Fri Jul 11 10:35:37 PDT 2008


Hi:

So here is my quandry. I have a list of stock symbols stored in array
(@sym), and am looking to test each symbol against a series of conditions
(foo1, foo2....). When the condition is met, I would like to remove that
symbol and return to the top of the loop to start working on the next
symbol. I'm having no trouble getting the test conditions to work, or the
looping to work. However I can't seem to remove the symbol from the array.
It's a conceptual thing at this point, so a solution is nice but not
required. Need to understand.

So here's what I had attempted...

foreach $symbol(@symbol) {
            if(foo1)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20080711/148f3767/attachment.html>


More information about the Chicago-talk mailing list