Control Structures: if
if ( $food eq 'apples' ) {
print "Hey, we've got apples!\n";
}
else {
print "Ew, no thanks.\n";
}
| CPU: Perl, Fall 2005 | Perl, Week 2: Arrays, Hashes, Control Structures | #13 |
if ( $food eq 'apples' ) {
print "Hey, we've got apples!\n";
}
else {
print "Ew, no thanks.\n";
}
| Copyright © 2005 Ian Langworth |