> It occurs because the only kind of variable allowed for specifying the > filehandle is a scalar--no array or hash elements. There are (or course) > several solutions. One is actually documented in the entry for print in > perlfunc: > > print({$Self->{FH}} "$TimeStamp$LogMsg\n"); > > Another possibility is documented in FileHandle's documentation: > > $Self->{FH}->print("$TimeStamp$LogMsg\n"); > > -- > Eric Amick > Columbia, MD
I'd like to thank Eric for his first suggestion, which I arrived at shortly after posting the question. One thing I find curious about the way the filehandle has to be specified for the print function is that the special notation using {} around the filehandle reference for the print function is not required for the open and close functions. For example: die("Unable to open $LogFile $!, stopped") unless (open($Self->{FH},$Str)); die("Close failed for filehandle $Self->{FH}") unless(close($Self->{FH})); This may or may not be a moot point concerning the future evolution of Perl, but I still find it curious that the filehandle references cannot be specified in the same format for the print and open or close functions. _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs