#have a cgi var default to something #option 1 $x = $cgi->param("input_var") or "foo"; #option 2 $x = $cgi->param("input_var") || "foo"; #have open a file or die #option 1 open( HANDLE, "foo.txt" ) or die; #option 2 open( HANDLE, "foo.txt" ) || die; #have some sort of logic test #option 1 if( $x eq "foo" or $y eq "bar" ) #option 2 if( $x eq "foo" || $y eq "bar" )
In reply to Re: or syntax
by Angel
in thread or syntax
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |