Re: can not print
am 09.08.2006 16:15:55 von Paul LalliGeorge Bouras wrote:
> # This does not work (the one I need) . I think it is a perl bug.
> # Any idea ?
Several. None of them overly polite... ;-)
> $hash->{fileid} = 'id1';
> open $hash->{fileid}, '>oooooooooooooo' or die;
> print $hash->{fileid} 'hello world';
> close $hash->{fileid};
Before assuming that you know what you're doing and Perl does not,
consider reading the documentation for the function you're using
perldoc -f print
Note that if you're storing FILEHANDLES in an array
or other expression, you will have to use a block
returning its value instead:
print { $files[$i] } "stuff\n";
print { $OK ? STDOUT : STDERR } "stuff\n";
Paul Lalli