in reply to Error coming while using Use Strict
The error happens in the following line. Please explain what the line is supposed to do:
print $file_handle $start."\n";
Please also explain what this line is supposed to do:
$file_handle=$val;
Maybe you want to read and understand open? None of the examples shown match your usage.
The relevant part for your error is
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.)
My advice is to just not do that and to use the documented examples instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Error coming while using Use Strict
by Anonymous Monk on Oct 13, 2011 at 09:46 UTC | |
by jethro (Monsignor) on Oct 13, 2011 at 10:03 UTC | |
by Anonymous Monk on Oct 13, 2011 at 10:12 UTC | |
by choroba (Cardinal) on Oct 13, 2011 at 10:30 UTC | |
by jethro (Monsignor) on Oct 13, 2011 at 14:02 UTC | |
by Corion (Patriarch) on Oct 13, 2011 at 11:13 UTC |