This is the usual thing to do if you want to exit following a failed test. E.g.#! /usr/bin/perl -w use strict; use warnings; print "The end is nigh!\n"; die "Arrrrrgh!"; __END__ The end is nigh! Arrrrrgh! at C:\Daniel\perl\PerlMonks\death.pl line 8.
open FILE, "no_such_file" or die $!;
In reply to Re: Exit With Line Number
by inman
in thread Exit With Line Number
by PerlBear
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |