in reply to Re: Fixing: Experimental keys on scalar is now forbidden
in thread Fixing: Experimental keys on scalar is now forbidden

it seems to be a question of why the extra braces are required.

The outer %{ ... } is a hash dereference.

The inner { ... } creates a hash and returns a reference to it.

In your first snippet, you have a hash dereference, but no hash.

Replies are listed 'Best First'.
Re^3: Fixing: Experimental keys on scalar is now forbidden
by NetWallah (Canon) on Jun 06, 2018 at 16:55 UTC
    Thanks for the clarification, ikegami (++).

    The postfix syntax below also works, and is easier to read.

    my @t = keys {map { $_ => 1 } qw|uno dos tres| }->%*;

                    Memory fault   --   brain fried