in reply to Use of uninitialized value $var in pattern match (m//)
The code you have posted does not produce that warning.
$ perl -w my $funct = sub($) { my $var = shift; my $var2 = $var =~ /red|green|blue/; $var2 = 'magenta' if ($var eq 'm'); return $var2; }; $
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use of uninitialized value $var in pattern match (m//)
by Laurent_R (Canon) on Apr 10, 2015 at 17:10 UTC |