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'.
In reply to Re^2: IO::Handles ... any good?
by jwkrahn
in thread IO::Handles ... any good?
by blowupp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |