- or download this
#!/usr/bin/perl -w
use strict;
...
print "Before: c=$c\n";
my $c = 1 unless $c;
print "After: c=$c\n";
- or download this
"my" variable $c masks earlier declaration in same scope at 492281.pl
+line 6.
- or download this
our $c = 2;
- or download this
print "Before: c=$c\n";
- or download this
my $c = 1 unless $c;
- or download this
print "After: c=$c\n";
- or download this
Use of uninitialized value in concatenation (.) or string at 492281.pl
+ line 7.
- or download this
#!/usr/bin/perl -w
use strict;
...
print "Before: c=$c\n";
my $d = 1 unless $c;
print "After: d=$d\n";
- or download this
Before: c=2
Use of uninitialized value in concatenation (.) or string at 492281.pl
+ line 7.
After: d=