|
Or: ||, or
Script Example:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
$a=4;
$b=6;
if($a == "4" || $b == "5") {
print "$a equal's 4 or 5\n"; }
else { print "$a does not equal 4 or 5\n"; }
exit();
Script Example:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
$file = "/usr/home/file.txt";
open(FILE,$file) or die "Error opening $file!\n";
@contents = <FILE>;
close(FILE);
open(FILE,$file) || die "Error opening $file!\n";
@contents = <FILE>;
close(FILE);
exit();
<< Back
|