deadpickle has asked for the wisdom of the Perl Monks concerning the following question:
Trying to print to a filehandle that is stored in a hash, but I get this error when I try to print to it:
Can't use string ("GLOB(0x9547728)") as a symbol ref while "strict refs"
Ideas?while (my ($fileh, $repoch) = each(%radar)){ if ($ltgepoch == $repoch) { if ($temp[3] eq "") { print $fileh "$temp[2],$temp[4],@date,@time\n"; print "$temp[0] $temp[1] $temp[2] $temp[4]\n"; } elsif ($temp[4] eq "") { print $fileh "$temp[2],$temp[3],@date,@time\n"; print "$temp[0] $temp[1] $temp[2] $temp[3]\n"; } } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: printing to filehandle contained in a hash
by ikegami (Patriarch) on Feb 20, 2010 at 01:44 UTC | |
Re: printing to filehandle contained in a hash
by jethro (Monsignor) on Feb 20, 2010 at 01:17 UTC | |
Re: printing to filehandle contained in a hash
by rubasov (Friar) on Feb 20, 2010 at 01:18 UTC | |
Re: printing to filehandle contained in a hash
by crashtest (Curate) on Feb 20, 2010 at 01:39 UTC |
Back to
Seekers of Perl Wisdom