in reply to die and subroutine combo
outputs:sub mysub { print STDERR "This is printed before the error message.\n"; return "\nThis is printed in the middle of the error message."; } open(TMPFILE,"<datafile.txt") || die "Cant open: $!" . mysub();
This is printed before the error message. Cant open: No such file or directory This is printed in the middle of the error message. at temp.pl line 6.
--
flounder
|
|---|