TCLUG Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:21227] Newbie perl question



Nick.T.Reinking@supervalu.com said:
> for (my $i = 0; $i <= $#addrlist; $i++)
>   {
>   if ($addrlist[$i] eq $addr) { splice (@addrlist, $i, 1); }
>   }

With a couple minor modifications (I have 3 lists to maintain, so this is
happening inside a sub and I have a reference to @addrlist.  Fortunately, the
obvious way to deal with this in the $#addrlist and $addrlist[$i] also
happens to be the right way.), this works great.  Thanks!

> FYI, coding questions should go to TCLUG-Devel.

Sorry about that.  Noted and corrected.

-- 
"Two words: Windows survives." - Craig Mundie, Microsoft senior strategist
"So does syphillis. Good thing we have penicillin." - Matthew Alton
Geek Code 3.1:  GCS d- s+: a- C++ UL++$ P+>+++ L+++>++++ E- W--(++) N+ o+
!K w---$ O M- V? PS+ PE Y+ PGP t 5++ X+ R++ tv b+ DI++++ D G e* h+ r++ y+