X
xhoster
I'm looking for a value to put in $some_string so that the
below code will have $y read from $scalar. I can't use the "<&4" syntax,
since $x doesn't have a real fileno to be duped.
open my $x, "<", \$scalar or die $!;
open my $y, $some_string or die $!;
The context of this is that I have an external (i.e. not my code) module
which won't take a file-handle, it will only take a "filename" which gets
passed to the 2-argument form of open. So I want to craft a magical
"filename" that when given to 2-arg open, does what I want.
Thanks,
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
below code will have $y read from $scalar. I can't use the "<&4" syntax,
since $x doesn't have a real fileno to be duped.
open my $x, "<", \$scalar or die $!;
open my $y, $some_string or die $!;
The context of this is that I have an external (i.e. not my code) module
which won't take a file-handle, it will only take a "filename" which gets
passed to the 2-argument form of open. So I want to craft a magical
"filename" that when given to 2-arg open, does what I want.
Thanks,
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.