in reply to Re^2: Why isn't this subroutine working?
in thread Why isn't this subroutine working?
It might have gone by you - JavaFan's question was more rhetorical, as the differences in output of the following code show you:
use strict; my $rowRef = { foo => 'foo value', bar => 'bar value', }; my $rowName = 'bar'; for my $rn ($rowName, '$rowName') { my $rowValue; if (exists $rowRef->{$rn}) { $rowValue = $rowRef->{$rn} } else { $rowValue = '<does not exist>'; }; print "rowRef for '$rn' is '$rowValue'\n"; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Why isn't this subroutine working?
by northwestdev (Acolyte) on May 20, 2009 at 13:31 UTC | |
by Anonymous Monk on May 20, 2009 at 13:38 UTC |