Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: FILEHANDLE with $var in name (for pipe)

by moodster (Hermit)
on Apr 05, 2002 at 11:22 UTC ( [id://156886]=note: print w/replies, xml ) Need Help??


in reply to FILEHANDLE with $var in name (for pipe)

I'm no expert on filehandles, but I believe it's possible to create a scalar reference to a filehandle (something like this):
my $handle; open $handle, "filename";
Then you can create an array of filehandle references and use your $loop variable to index that array. So, instead of FROM_CHILD_$loop, you'd use:
$from_child[ $loop ]

Cheers,
--Moodster

Replies are listed 'Best First'.
Re: Re: FILEHANDLE with $var in name (for pipe)
by kappa (Chaplain) on Apr 05, 2002 at 12:05 UTC
    This requires perl-5.6 which is usually the version you download nowadays. More information can be found at recent perldelta.

Log In?
Username:
Password:

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

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

    No recent polls found