[Israel.pm] convert perl string to file handle

Tal Kelrich tal at musicgenome.com
Sun Jun 6 07:54:49 PDT 2004

On Sun, 6 Jun 2004 16:03:39 +0300
"Itamar Elem" <elem at compugen.co.il> wrote:
> is there a efficinet way to convert perl string to file handle?
> i used something like:
> $buffer="....."
> open IN,qq{echo $buffer|};
> print <IN>;
> but is there a better way?
> thank
> itamar

how about:

pipe R_P,W_P;
print W_P $buffer;
close W_P;

#now hand in the other side of the pipe
print <R_P>;

Tal Kelrich
PGP fingerprint: 3EDF FCC5 60BB 4729 AB2F  CAE6 FEC1 9AAC 12B9 AA69
Key Available at: http://www.hasturkun.com/pub.txt
Take care of the luxuries and the necessities will take care of
themselves. -- Lazarus Long
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://perl.org.il/pipermail/perl/attachments/20040606/abf55da6/attachment.pgp 

More information about the Perl mailing list