Article View: news.software.nntp
Article #29159Re: Odd cleanfeed problem
From: Jeremy
Date: Sun, 14 Jun 1998 00:00
Date: Sun, 14 Jun 1998 00:00
37 lines
1830 bytes
1830 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote:
> >>>>> "?" == ? the platypus {aka David Formosa}
> <dformosa@st.nepean.uws.edu.au> writes:
>
> >> Hmm. You do know that doing deletes inside a while(each %hash) loop is
> >> definitely a no-no?
>
> ?> ]each HASH
> ?> ]
> ?> ][...] You must not add elements to the hash while iterating over it,
> ?> ]although you are permitted to use delete.
>
> ?> I think you have been missinformed.
>
> From perldoc -f each
>
> If you add or delete elements of a hash while you're
> iterating over it, you may get entries skipped or duplicated, so don't.
Hmm. I took my advice from the Camel. Interesting that they conflict.
Off to Dejanews...
Larry Wall, 9/12/1995, <1995Sep12.061020.21117@netlabs.com>:
| It's okay in Perl 5 (but not in Perl 4) to delete the current "each"
| element.
Should I change it anyway?
--
Jeremy | jeremy@exit109.com
"If it's not real, WHY DOES IT TAKE UP DISK SPACE?" --bev.
net.subculture.usenet
Technical Details
Message-ID:
<6m1cl1$jf5$1@news1.exit109.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<6lu4nq$i83$1@opal.southwind.net> <87zpfgl1b4.fsf@erlenstar.demon.co.uk> <897846749.943964@cabal> <87lnqzkfcw.fsf@erlenstar.demon.co.uk>Show Full Headers
Complete Article Headers
Message-ID: <6m1cl1$jf5$1@news1.exit109.com> Subject: Re: Odd cleanfeed problem Date: Sun, 14 Jun 1998 00:00:00 +0000 From: Jeremy <jeremy@exit109.com> References: <6lu4nq$i83$1@opal.southwind.net> <87zpfgl1b4.fsf@erlenstar.demon.co.uk> <897846749.943964@cabal> <87lnqzkfcw.fsf@erlenstar.demon.co.uk> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 362618443 X-Trace: news1.exit109.com 897856993 19941 208.225.64.3 (14 Jun 1998 20:43:13 GMT) Organization: There Is No Organization NNTP-Posting-Date: 14 Jun 1998 20:43:13 GMT Newsgroups: news.software.nntp