in reply to Exit With Line Number
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 $!;
|
|---|