in reply to Can't see the syntax error here...
When is a block a block, and when is it a hash reference?Seems like your problem illustrates this point.
$ perl use strict; use warnings; my $xnix='X'; sub f { my $z = {$xnix => 100}->{'X'}; # make it a hash reference return $z; } print f(),"\n"; __END__ 100
|
|---|