On Wed, Nov 5, 2008 at 10:17, John W. Krahn <[EMAIL PROTECTED]> wrote:
snip
>> open (IN, "$_") or die "can't open file $_";
>
> perldoc -q quoting
>
> You should also include the $! variable in the error message so you know
> *why* it failed.
>
>> while (<IN>) {
snip
You should be using lexical filehandles and the three argument version of open*:
open my $in, "<", $_
or die "could not open file $_: $!";
while (<$in>) {
* http://perldoc.perl.org/functions/open.html
--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/