Re: Perl forgets variable every other pass in loop???
- From: Keith Keller <kkeller-usenet@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Aug 2008 20:28:24 -0700
On 2008-08-28, John W. Krahn <someone@xxxxxxxxxxx> wrote:
That is the way that each() works.
From perldoc -f each:
When the hash is entirely read, a null array is
returned in list context (which when assigned pro-
duces a false (0) value), and "undef" in scalar
context. The next call to "each" after that will
start iterating again.
So the ''forgotten'' entries are the null arrays.
--keith
--
kkeller-usenet@xxxxxxxxxxxxxxxxxxxxxxxxxx
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
.
- References:
- Perl forgets variable every other pass in loop???
- From: David Filmer
- Perl forgets variable every other pass in loop???
- Prev by Date: Re: Perl forgets variable every other pass in loop???
- Next by Date: FAQ 7.23 How do I create a switch or case statement?
- Previous by thread: Re: Perl forgets variable every other pass in loop???
- Next by thread: FAQ 7.23 How do I create a switch or case statement?
- Index(es):
Relevant Pages
|