Craig A. Berry wrote:
> 
> I'm not sure what's ultimately going on here but quoting the argument
> to the eval somehow causes it to come up with a different answer than
> leaving it unquoted:
> 
> $ perl -e "open qq/<nofile.dat/; print eval('$!{ENOENT}');"
> 0
> $ perl -e "open qq/<nofile.dat/; print eval($!{ENOENT});"
> 2
> 
> Unless there is some reason for those quotes that I'm not aware of,

With the quotes, you are doing an eval EXPR on the string "\$!{ENOENT}",
and without the quotes, you are doing an eval EXPR on the number 2.

-- 
print reverse( ",rekcah", " lreP", " rehtona", " tsuJ" )."\n";

Reply via email to