pass a filehandle to subroutines 
Author Message
 pass a filehandle to subroutines

Hi

I open a filehandle in the main program, but i like to write to the
file in some subroutines. Is it possible to pass the filehandle to
those subs and how? Thanks!



Tue, 31 Aug 2004 09:39:31 GMT  
 pass a filehandle to subroutines

Quote:

> Hi

> I open a filehandle in the main program, but i like to write to the
> file in some subroutines. Is it possible to pass the filehandle to
> those subs and how? Thanks!

If you say

  perldoc -q filehandle

then you should see the answer to the frequently asked question

       How can I make a filehandle local to a subroutine?  How do
       I pass filehandles between subroutines?  How do I make an
       array of filehandles?

which might give you some ideas.

Hope this helps,

Mike

--

http://www.stok.co.uk/~mike/       | GPG PGP Key      1024D/059913DA

http://www.starnix.com/            |                  75D2 9EC4 C1C0 0599 13DA



Tue, 31 Aug 2004 09:44:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. passing the null filehandle to a subroutine

2. Passing filehandles to subroutines and local() behavior.

3. how to pass filehandle to subroutine?

4. Passing filehandle to subroutine

5. Passing filehandles to package subroutines

6. How to pass FILEHANDLE to a subroutine???

7. Passing a FILEHANDLE to a subroutine?

8. Passing Filehandle to subroutine.

9. Passing filehandles to subroutines

10. still a problem passing filehandle to subroutine

11. Passing filehandle to/from a subroutine

12. Passing Filehandles to subroutines

 

 
Powered by phpBB® Forum Software