Help for this page

Select Code to Download


  1. or download this
    $c = &func();
    $c ? say "$c found!" : say "None!";
    
  2. or download this
    $c = (&func() ? say "$c found!" : say "None!");
    
  3. or download this
    perl -Mstrict -E 'sub func {5}; my $c; my $results = ( $c=func() ? 1 :
    + 2); say $c, "\t", $results'
    
  4. or download this
    perl -Mstrict -E 'sub func {5}; my $c; my $results = ( $c=func()) ? 1 
    +: 2; say $c, "\t", $results'