link867 has asked for the wisdom of the Perl Monks concerning the following question:
I have been having the hardest time with the open function on the server I am coding. I had no problem with it on my VM but because of restrictions of the proxy server I have to use a server to script. This is the output of perl -v: This is perl, v5.8.0 built for i586-pc-sco3.2v5.0 and unname -a: SCO_SV 3.2 5.0.7 i386 I keep getting Can't use an undefined value as a symbol reference at ./templateChecker.pl line 97 Here is the problem sub:
I have also tried different ways :sub getComment { my $switchIp = $_[0]; my $INFILE; open ($INFILE, 'templateHosts' ) or die "can't open file $!"; my @hostsText = <$INFILE>; my $hostsLine = "";
Thanks for any help!open ($INFILE, '<', 'templateHosts') open ($INFILE, '< templateHosts') open $INFILE, '<templateHosts')
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Undefined value as a symbol reference
by kennethk (Abbot) on Jul 21, 2014 at 20:20 UTC | |
by link867 (Initiate) on Jul 21, 2014 at 20:35 UTC | |
by kennethk (Abbot) on Jul 21, 2014 at 20:46 UTC | |
by Anonymous Monk on Jul 21, 2014 at 22:12 UTC | |
by kennethk (Abbot) on Jul 21, 2014 at 23:48 UTC | |
| |
by link867 (Initiate) on Jul 21, 2014 at 20:54 UTC | |
|
Re: Undefined value as a symbol reference
by link867 (Initiate) on Jul 21, 2014 at 20:39 UTC |