in reply to Re: Unintialised value?
in thread Unintialised value?
exit 0 unless exists $pages{$page} and defined $pages{$page} and $pages{$page} == 1;
Is the exists test really necessary here? Shouldn't the test for defined suffice? In my (admittedly limited :-) experience, a perl variable that is defined necessarily exists, so:
exit 0 unless defined $pages{$page} and $pages{$page} == 1;
should suffice.
But perhaps I'm missing something, and you can show some instance where both tests are needed?
TIA
dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Unintialised value?
by davido (Cardinal) on Jan 26, 2004 at 03:03 UTC |