http://qs1969.pair.com?node_id=11137939

wyt248er has asked for the wisdom of the Perl Monks concerning the following question:

The perl guide document "perlpacktut" contain the following command statements, which look like assignments.

$UTF8{Euro} = pack( 'U', 0x20AC ); # Equivalent to: $UTF8{Euro} = "\x{20ac}"; $Unicode{Euro} = unpack( 'U', $UTF8{Euro} );

The tokens `$UTF8{Euro}` and `$Unicode{Euro}` seem to be treated as variables. However, the typical perl variables I am familiar with are of the form $v or ${v} but not $v{u}. In fact, the following code ends up with an error.

#!/usr/bin/perl my $v{u} = "hello"; print($v{u}, "\n");

syntax error at ./test.pl line 3, near "$v{u"

What are `$UTF8{Euro}` and `$Unicode{Euro}`? Which perl guide document explain this kind of token?

Thank you in advance.