in reply to Re: IO::Handles ... any good?
in thread IO::Handles ... any good?
The || operator has higher precedence than the = operator so you should either enclose the assignment in parentheses:
( my $file = $ARGV[0] ) || die "Synopsys: $0 <filename>" ;
or use the lower precedence or operator:
my $file = $ARGV[0] or die "Synopsys: $0 <filename>" ;
Also, that test will fail if you have a file named '0'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: IO::Handles ... any good?
by ikegami (Patriarch) on Mar 22, 2009 at 19:25 UTC |