Help for this page

Select Code to Download


  1. or download this
    $ perl -c -e'my $x = if (f()) { g(); } else { h(); }'
    syntax error at -e line 1, near "= if"
    ...
    $ perl -e'my $x = unless (f()) { g(); } else { h(); }'
    syntax error at -e line 1, near "= unless"
    -e had compilation errors.
    
  2. or download this
    $ perl -c -e'my $x = ( f() and g() );'
    -e syntax OK
    ...
    $ perl -c -e'my $x = ( if (f()) { g() } );'
    syntax error at -e line 1, near "( if"
    -e had compilation errors.