#!/usr/bin/perl use strict; use warnings; use Test::More tests => 6; my %french_for = ( one => 'un', ); my $num = 'one'; is "$french_for{one}", 'un', 'bare literal key'; is "$french_for{'one'}", 'un', 'single quoted literal key'; is qq[$french_for{"one"}], 'un', 'double quoted literal key'; is "$french_for{$num}", 'un', 'bare variable key'; is "$french_for{'$num'}", 'un', 'single quoted variable key'; is qq[$french_for{"$num"}], 'un', 'double quoted variable key'; #### temp $ touch foo.bar temp $ ls foo.bar temp $ perl -Te '%ENV = (); print "$ENV{`rm foo.bar`}"' temp $ ls temp $