Back to Perl
- The special error message variable is $!
if ( ! open MESSAGES, '>msgs' ) {
die "Holy crap: $!";
}
- ..or..
if ( @ARGV != 3 ) {
die "usage: ./my_program (3 things)";
}
| CPU: Perl, Fall 2005 | Perl, Week 4: More Arrays, Context, Subroutines, Lexical Variables | #34 |
if ( ! open MESSAGES, '>msgs' ) {
die "Holy crap: $!";
}
if ( @ARGV != 3 ) {
die "usage: ./my_program (3 things)";
}
| Copyright © 2005 Ian Langworth |