in reply to Re^2: comparing lists
in thread comparing lists
I see you are using if (defined $xxx{$yyy}) where you probably intended if (exists $xxx{$yyy})
In general it is useful to provide the fail reason for opens using $!:
open(NCLIST, $ncaccts) || die ("Cannot open $ncaccts: $!");
The line open($output, '>', 'output.txt' || die "Cannot open output file output.txt"); has a missing ) and (. It should be open($output, '>', 'output.txt') || die ("Cannot open output file output.txt: $!");
You should always use the three parameter open. It makes the input explicit and in other contexts where the file name is provided by the user avoids malicious effects from a user putting > at the start of a file name.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: comparing lists
by Anonymous Monk on Feb 04, 2006 at 22:44 UTC |