Help for this page

Select Code to Download


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