Because the iterator ->fetchrow_hashref returns one scalar undef when done. But a list assignment (...) = ... is only false if the list is empty. °
It might have been better to return an empty list. This would have worked similarly well in list as scalar context.
But it's only supposed to return one scalar - the mentioned hashref - anyway.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) see also Re: list context (iterators)
In reply to Re^2: my $x or my ($x)
by LanX
in thread my $x or my ($x)
by tamaguchi
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |