in reply to Can't see the syntax error here...

chromatic wrote What's Wrong with Perl 5:
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
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]