Ahem, both of those snippets are non-working:
$ perl -Mstrict -wE 'my $h = {foo=>"bar"}; my $c = keys ${$h};' Experimental keys on scalar is now forbidden at -e line 1. Type of arg 1 to keys must be hash or array (not scalar dereference) a +t -e line 1, near "};" Execution of -e aborted due to compilation errors.
... presumably you meant:$ perl -Mstrict -wE 'my $h = {foo=>"bar"}; my $c = keys $$h;' Experimental keys on scalar is now forbidden at -e line 1. Type of arg 1 to keys must be hash or array (not scalar dereference) a +t -e line 1, near "$h;" Execution of -e aborted due to compilation errors.
$ perl -Mstrict -wE 'my $h = {foo=>"bar"}; my $c = keys %{$h};'
$ perl -Mstrict -wE 'my $h = {foo=>"bar"}; my $c = keys %$h;'
Aside: how odd that your post continues to garner upvotes (rep up three since I posted this); you don't suppose people vote based on the author's reputation without really reading the post, do you!?
In reply to Re^3: Perl Python Partial Polyglot
by 1nickt
in thread Perl Python Partial Polyglot
by kschwab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |