Help for this page

Select Code to Download


  1. or download this
    ]$ perl -wMstrict -e"if( my($test) = 0 ) { print 'Passed'; } else { pr
    +int 'Failed'; }"
    Can't declare stub in "my" at -e line 1, near ") ="
    ...
    ]$ perl -wMstrict -e "if( my $test = undef ) { print 'Passed'; } else 
    +{ print 'Failed'; }"
    syntax error at -e line 1, near "my  ="
    Execution of -e aborted due to compilation errors.
    
  2. or download this
    ]$ perl -wMstrict -e 'if( my ($test) = undef ) { print "Passed"; } els
    +e { print "Failed"; }'
    Passed
    
    ]$ perl -wMstrict -e 'if( my $test = undef ) { print "Passed"; } else 
    +{ print "Failed"; }'
    Failed