> 
> If you don't mind using the IO::Handle module then it provides an 
> 'opened' method.  Otherwise you may want to have a look at its source, 
> or check out
> 
> perldoc -f fileno
> 
> Which is all the 'opened' method does...

This will work (thanks).... 

Tell me, is there a way to cross-reference the file handle to the variable I
am using?  Suppose I have something like
   open(IN, "< $myFile)
Can I do some kind of system call to see what variable name is associated
with 'IN'?

Alternatively, I guess, I could do something like
   open(IN, "< $myFile) && ($myFileNum = fileno(IN)) or die "open failed"

Thoughts??


-Jeff


> Jeff Westman wrote:
> > Isn't there a perl function to test if a file is already open?  I could
> have
> > sworn I used one called "isopen()" or "ifopen()"  .... -or- am I getting
> > confused with a similar function in C?
> > 
> > If there isn't such a function, how would one test if a file is already
> open?
> > 


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to