in reply to print on a hash-stored-handle
The CookBook says "only simple scalar variables, not expressions or subscripts into hashes or arrays, can be used with build-ins like print, printf or the diamond operator. ... you get around this by using a block and an expression where you would place the filehandle". In your case, that's:
print { $self->{fh} } "Greetings, Professor.";
--bwana147
|
|---|