how is die used? I've seen it many times, infact someone posted:
open(MCF,"member_colour_file.txt" || die "error message";
to help someone on this forum... Does this mean that if the file can't be opened an error message is given? When I try that, I don't see the error message. Where does it appear? couldn't I say
open(MCF,"member_colour_file.txt" || print "error message";
and that way I'd see it?
Secondly, according to some of the perl stuff I've read in the O'Reilly book and on the net,
open(MCF,"member_colour_file.txt" || die "error message";
is wrong, it should be
open(MCF,"member_colour_file.txt" or die "error message";
is this true?
open(MCF,"member_colour_file.txt" || die "error message";
to help someone on this forum... Does this mean that if the file can't be opened an error message is given? When I try that, I don't see the error message. Where does it appear? couldn't I say
open(MCF,"member_colour_file.txt" || print "error message";
and that way I'd see it?
Secondly, according to some of the perl stuff I've read in the O'Reilly book and on the net,
open(MCF,"member_colour_file.txt" || die "error message";
is wrong, it should be
open(MCF,"member_colour_file.txt" or die "error message";
is this true?