in reply to File Handler

Is it possible to pass the same file handler as reference in two different subroutine ?

use FileHandle; sub f1 { my $handle=shift; ... } sub f2 { my $handle=shift; ... } my $fh=FileHandle->new(); ... f1($fh); f2($fh);

What is disadvantage of having many file handlers passed to many subroutines ?
Depends on your definition of the word many, on the operating system you are using, and whether or not the file handles point to open files. I recently stumbled over the problem, that on Windoze (if we want to call this an "operating system"), having a few hundreds of simultaneously open file handles caused the system to let me open a new one. This has, of course, nothing to do with passing them to *subroutines*.

-- 
Ronald Fischer <ynnor@mm.st>