Help for this page

Select Code to Download


  1. or download this
     $ perl -e " use diagnostics; my $c = $c; "
    Name "main::c" used only once: possible typo at -e line 1 (#1)
        (W once) Typographical errors often show up as unique variable nam
    +es.
    ...
        %c, *c, &c, sub c{}, c(), and c (the filehandle or format) are con
    +sidered
        the same; if a program uses $c only once but also uses any of the 
    +others it
        will not trigger this warning.
    
  2. or download this
    $ perl -e " use diagnostics; my $c = $c; my $c = $c; "
    "my" variable $c masks earlier declaration in same scope at -e line 1 
    +(#1)
    ...
        will not trigger this warning.