jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
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 ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: filehandle stored in hash-ref
by moritz (Cardinal) on Dec 10, 2009 at 15:19 UTC | |
|
Re: filehandler stored in hash-ref
by keszler (Priest) on Dec 10, 2009 at 15:20 UTC | |
|
Re: filehandler stored in hash-ref
by kyle (Abbot) on Dec 10, 2009 at 15:25 UTC | |
|
Re: filehandler stored in hash-ref
by ikegami (Patriarch) on Dec 10, 2009 at 15:29 UTC | |
|
Re: filehandler stored in hash-ref
by jeanluca (Deacon) on Dec 10, 2009 at 16:04 UTC | |
by ikegami (Patriarch) on Dec 10, 2009 at 16:26 UTC | |
by jeanluca (Deacon) on Dec 10, 2009 at 16:58 UTC | |
by ikegami (Patriarch) on Dec 10, 2009 at 17:04 UTC | |
by kyle (Abbot) on Dec 10, 2009 at 17:05 UTC | |
by jeanluca (Deacon) on Dec 10, 2009 at 17:22 UTC |