in reply to Eval/package question
What is wrong? Why does the eval somehow access my hash, but does not add the value? Is it something obvious and I'm just blind today?
It does access the hash and puts this slots value on the LHS, not the hash slot accessing expression. So yes, you're being blind :-)
Try
eval ("\$items{3}{Value} = 2;"); # also: eval ('$items{3}{Value} = 2;');
Had you checked $@ after the eval, you would have seen that it contains
syntax error at (eval 2) line 1, near "="
since the LHS of the assignment is empty.
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
|
---|
In Section
Seekers of Perl Wisdom