Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: pointing a filehandle at a scalar or array ?

by athomason (Curate)
on Jul 26, 2000 at 14:18 UTC ( [id://24440]=note: print w/replies, xml ) Need Help??


in reply to pointing a filehandle at a scalar or array ?

If the data you want to pass is static (which I doubt, since there's little sense in using MIME::Decoder for static data), you could stick it at the end of your source after the __DATA__ line and just pass around the *DATA filehandle. A quick hack that is possibly more flexible would be to pass *STDOUT as the input for whatever function you're dealing with and then print to it. Actually, that sounds too funky, but it's late and I can nail down why (blocking issues?). As davorg mentioned above, your best bet is probably looking into using tie for dynamic data.

Replies are listed 'Best First'.
RE: Re: pointing a filehandle at a scalar or array ?
by lindex (Friar) on Jul 26, 2000 at 14:51 UTC
    Well I was thinking about something like that, maybe define a null filehandle then write to it and pass it :\, I dunno



    lindex
    /****************************/ jason@gost.net, wh@ckz.org http://jason.gost.net /*****************************/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://24440]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found