Help for this page

Select Code to Download


  1. or download this
        % perl -wle 'sub foo { 1 for @_ } print 2 if defined foo()'
        % perl -wle 'sub foo { 1 for @_ } print 2 if defined foo(3)'
    ...
        2
        % perl -wle 'sub foo { 1 for @_ } print 2 if foo(3) eq ""'
        2
    
  2. or download this
        % perl -wle 'sub foo { 43 for @_ } print 2 if defined foo()'
        Useless use of a constant in void context at -e line 1.