jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks
I want to store a filehandler in a hash-ref and use it like:
Looks ok (to me), but doesn't work. If I change this code tomy $s = {} ; open( $s->{out}, ">out" ) or die "hmmmm\n" ; print $s->{out} "test" ; close $s->{out} ;
it works fine. For some reason 'print' doesn't recognize $s->{out} as a filehandler. Any suggestions ? thnx LuCamy $s ; open( $s, ">out" ) or die "hmmmm\n" ; print $s "test" ; close $s ;
Back to
Seekers of Perl Wisdom