Ken Foskey wrote:
On Thu, 2007-07-26 at 20:42 -0400, Mr. Shawn H. Corey wrote:
Tom Phoenix wrote:
On 7/25/07, Johnson, Reginald (GTI) <[EMAIL PROTECTED]> wrote:
open (OMARFILE, "<junk" || die "input file cannot be openned:$!\n");
The brackets are in the wrong place.
The other answers were just far to clever & cryptic.
Hehe how true.
What this
open (OMARFILE, "<junk" || die "input file cannot be openned:$!\n");
does is
open(OMARFILE, ("<junk" || die "input file cannot be openned:$!\n"));
and because "<junk" is true, die is never called and we have just
open(OMARFILE, "<junk");
What I recommend instead is
open OMARFILE, 'junk' or die "Input file cannot be opened: $!";
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/