$foo =~ s//$g1/;
$foo =~ s/$m1/$g1/;
$foo =~ s/./$m1/e;
+undef $g1;
+$m1 = '$g1';
+$foo =~ s//$m1/ee;
EXPECT
Use of uninitialized value $_ in pattern match (m//) at - line 5.
Use of uninitialized value $m1 in regexp compilation at - line 6.
Use of uninitialized value $m1 in regexp compilation at - line 40.
Use of uninitialized value $g1 in substitution iterator at - line 40.
Use of uninitialized value $m1 in substitution iterator at - line 41.
+Use of uninitialized value in substitution iterator at - line 44.
########
use warnings 'uninitialized';
my ($m1);
Use of uninitialized value $g1 in gmtime at - line 6.
########
use warnings 'uninitialized';
-my ($m1, $v);
+my ($m1, $m2, $v);
$v = eval;
$v = eval $m1;
+$m2 = q($m1); $v = 1 + eval $m2;
EXPECT
Use of uninitialized value $_ in eval "string" at - line 4.
Use of uninitialized value $m1 in eval "string" at - line 5.
+Use of uninitialized value in addition (+) at - line 6.
########
use warnings 'uninitialized';
my ($m1);