in reply to Re^2: Undefined value as a symbol reference
in thread Undefined value as a symbol reference
or explicitly define your glob with Symbol:open (INFILE, 'templateHosts' ) or die "can't open file $!";
You'll probably have to explicitly close your filehandle assuming you want that done before end of execution. I'd probably go for the last option, as it's the closest to modern syntax. Actually, I'd try and raise enough fuss to upgrade to a modern version of Perl, but I assume that's not an available option....use Symbol; my $INFILE = gensym; open ($INFILE, 'templateHosts' ) or die "can't open file $!";
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Undefined value as a symbol reference
by Anonymous Monk on Jul 21, 2014 at 22:12 UTC | |
by kennethk (Abbot) on Jul 21, 2014 at 23:48 UTC | |
by Anonymous Monk on Jul 22, 2014 at 00:09 UTC | |
by link867 (Initiate) on Jul 22, 2014 at 13:43 UTC | |
by Anonymous Monk on Jul 22, 2014 at 17:34 UTC | |
| |
by link867 (Initiate) on Jul 22, 2014 at 13:46 UTC | |
|
Re^4: Undefined value as a symbol reference
by link867 (Initiate) on Jul 21, 2014 at 20:54 UTC |