in reply to Undefined value as a symbol reference
Also, are you certain that you've replicated the code exactly? From open:open( my $INFILE, '<', 'templateHosts') or die "can't open file $!";
If FILEHANDLE is an undefined scalar variable (or array or hash element), a new filehandle is autovivified, meaning that the variable is assigned a reference to a newly allocated anonymous filehandle. Otherwise if FILEHANDLE is an expression, its value is the real filehandle. (This is considered a symbolic reference, so use strict "refs" should not be in effect.)It looks like the interpreter is regressing into this symbolic reference behavior, though this would presuppose your value is not null.
#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^2: Undefined value as a symbol reference
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 Anonymous Monk on Jul 22, 2014 at 00:09 UTC | |
| |
by link867 (Initiate) on Jul 22, 2014 at 13:46 UTC | |
by link867 (Initiate) on Jul 21, 2014 at 20:54 UTC |