Re: How to check for a file already opened

2005-12-26 Thread reader
John W. Krahn [EMAIL PROTECTED] writes: John W. Krahn wrote: Well, let's see what each one does: Nice examples... thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: How to check for a file already opened

2005-12-24 Thread John W. Krahn
John W. Krahn wrote: [EMAIL PROTECTED] wrote: Do either of you know if this second technique has the same small liability mentioned for the first one above: (From `perldoc -f fileno') `(Filehandles connected to memory objects via new features of open may return undefined even though they

How to check for a file already opened

2005-12-23 Thread reader
How can I check inside a script to see if a file has already been opened early and is still open? Does the perl interpreter keep track of that kind of stuff. It seems error prone to set a variable to TURE or something on open since you then have to remember to null it out on close. I'd like it

Re: How to check for a file already opened

2005-12-23 Thread John W. Krahn
[EMAIL PROTECTED] wrote: How can I check inside a script to see if a file has already been opened early and is still open? Does the perl interpreter keep track of that kind of stuff. It seems error prone to set a variable to TURE or something on open since you then have to remember to null

Re: How to check for a file already opened

2005-12-23 Thread Adriano Ferreira
On 12/22/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How can I check inside a script to see if a file has already been opened early and is still open? Does the perl interpreter keep track of that kind of stuff. Maybe what you want is the function Copenhandle from CScalar::Util module. See

Re: How to check for a file already opened

2005-12-23 Thread reader
John W. Krahn [EMAIL PROTECTED] writes: [EMAIL PROTECTED] wrote: How can I check inside a script to see if a file has already been opened early and is still open? Does the perl interpreter keep track of that kind of stuff. It seems error prone to set a variable to TURE or something on

Re: How to check for a file already opened

2005-12-23 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Do either of you know if this second technique has the same small liability mentioned for the first one above: (From `perldoc -f fileno') `(Filehandles connected to memory objects via new features of open may return undefined even though they are open.)'