Mark Goland wrote:
So once you know that its a filehandle, how [ if you can ] can you tell
which file its associated with ??

Mark


Interesting question, but it seems from my recent dealings with such things, that you can't, because a filehandle doesn't necessarily have to be attached to a 'file' at all. It could be attached to a pipe as well, which still has a file descriptor (two essentially) but no file on the file system, per se. And the only way to attach a filehandle to a file is to perform an open, and theoretically the only way to perform an open is to either associate it with another pre-existing file descriptor (read: file you opened, pipe, etc.) or a path to the file, and if you are the one doing the opening then seemingly you would know what filehandle is associated with which file. Which leads me to wonder about STDIN, STDOUT, STDERR which are the exceptions, they are opened for you, but again it seems 'Perl' is the one that has opened them, and they may or may not be just pipes from the shell or the tty, and if you munge them to point to something new, then again, you should know what you have done.

Head beginning to hurt....going to bed...Hopefully someone with system level knowledge can shed some light on this.

http://danconia.org


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

Reply via email to