[Israel.pm] convert perl string to file handle
Gaal Yahas
gaal at forum2.org
Sun Jun 6 08:41:41 PDT 2004
On Sun, Jun 06, 2004 at 06:39:08PM +0300, Tal Kelrich wrote:
> would this be any better?
>
> $buffer="foo";
> if(open(FH,"-|")==0)
> { #child
> print FH $buffer;
> close FH;
> exit;
> }
> #parent, gather
> print <FH>;
> close FH;
Yes. But if the OP's library code needed random access semantics, a pipe
would obviously ever be good enough.
--
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/
More information about the Perl
mailing list