R
rihad
Hello there,
Say we have a $hash:
if ($hash{'A-String-Of-Any-Length'} eq 'foo') { ... }
else if ($hash{'A-String-Of-Any-Length'} eq 'bar') { ... }
Would Perl notice that hash lookup needs to be resolved only once, and
optimize further accesses? Or does one need to explicitly use a $tmp
for that?
Thanks.
Say we have a $hash:
if ($hash{'A-String-Of-Any-Length'} eq 'foo') { ... }
else if ($hash{'A-String-Of-Any-Length'} eq 'bar') { ... }
Would Perl notice that hash lookup needs to be resolved only once, and
optimize further accesses? Or does one need to explicitly use a $tmp
for that?
Thanks.