$ perl -MO=Deparse -e 'foo(\my $bar)'
foo \my($bar);
-e syntax OK
$ perl -MO=Deparse -e 'my $bar; foo(\$bar)'
my $bar;
foo \$bar;
-e syntax OK
####
#!/usr/bin/perl
use strict;
use Data::Dumper;
my %hash1 = ( foo => my ($bar) );
$bar = 2;
my %hash2 = ( foo => \my $bar2 );
$bar2 = 2;
print Data::Dumper->Dump([\%hash1,\%hash2], [qw(*hash1 *hash2)]);
####
my $ref = \my $foo;
printf $ref eq \$foo ? "Same address\n" : "Not same address\n";
my @array = \my ($this, $that);
$this = "Ovid";
print Data::Dumper->Dump([\@array,$this,$that], [qw(*array *this *that)]);