pcouderc has asked for the wisdom of the Perl Monks concerning the following question:
I do not understand this error and I ask for the wisdom of the great Mongs. Thank you in advance. Pierre Couderc#!/usr/bin/perl -w use strict; my $LOGFILE; my $line; $LOGFILE = "access.log"; open(LOGFILE) or die("Could not open log file."); foreach $line (<LOGFILE>) { # do line-by-line processing. } close(LOGFILE); I get a very surprising : $ perl prov.pl Use of uninitialized value in open at prov.pl line 7. Could not open log file. at prov.pl line 7.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use of uninitialized value in open
by Corion (Patriarch) on Jun 10, 2008 at 08:16 UTC | |
|
Re: Use of uninitialized value in open
by moritz (Cardinal) on Jun 10, 2008 at 08:34 UTC | |
by pcouderc (Monk) on Jun 10, 2008 at 08:38 UTC | |
by ikegami (Patriarch) on Jun 10, 2008 at 10:19 UTC | |
|
Re: Use of uninitialized value in open
by cdarke (Prior) on Jun 10, 2008 at 09:05 UTC | |
|
Re: Use of uninitialized value in open
by linuxer (Curate) on Jun 10, 2008 at 09:45 UTC |