in reply to Location of Conditional test effects results
$editor = "no editor" if $record->{'services'}[0]{'class'} eq 'Pri +mary'; $editor = "no editor" if $record->{'services'}[0]{'class'} eq 'Sec +ondary';
the array element @{$record->{'services'}} contains one element - an anonymous hash holding at least the key class whose value might be undef.
You are looking at the value of $record->{'services'}[0]{'class'}, but to do that the key class in the hash %{$record->{'services'}[0]} has to exist, so perl just allocates the hash and the key for you. After that, the anonymous array has at least one element.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Location of Conditional test effects results
by chakram88 (Pilgrim) on Apr 10, 2007 at 20:23 UTC | |
by ikegami (Patriarch) on Apr 10, 2007 at 21:43 UTC | |
by chakram88 (Pilgrim) on Apr 11, 2007 at 01:16 UTC |