programming-examples/perl/SystemFunction/The die function exits the Perl script and prints out an error message to STDERR.pl
2019-11-15 12:59:38 +01:00

7 lines
109 B
Perl

#!/usr/bin/perl -w
$filename = "nofile";
open(TMP, $filename)
or die "Can't open \"$filename\"";