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.
In reply to Re: Error coming while using Use Strict
by Corion
in thread Error coming while using Use Strict
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |