[tpm] how to delete a list entry from within a foreach

Fulko Hew fulko.hew at gmail.com
Wed May 13 09:34:50 PDT 2009

I know this is probably simple, but I'm having a mental block,
and I can't find the 'easy' solution in any book right now...

If I'm foreach'ing over a 'pick list', I need to get a positive indication
that a match was found and then remove it from the 'pick list'.

something like:

if requestedvalue is on the picklist {
   remove it from the list
   return found
} else {
   return notfound

Being Perl, I'm sure there is an elegant way... If only I knew.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20090513/1998ab00/attachment.html>

More information about the toronto-pm mailing list