Help for this page

Select Code to Download


  1. or download this
    % perl -wle 'my %foo; if ( %foo ) { print "OK" } else { print "KO" }'
    KO
    % perl -wle 'my %foo = (1,2); if ( %foo ) { print "OK" } else { print 
    +"KO" }'
    OK
    
  2. or download this
    % perl -wl
    print( %foo ? "OK" : "KO" );
    ...
    ^D
    KO
    OK
    
  3. or download this
    if ( grep defined, values %foo ) {
      # etc.
    }