in reply to Re: Storing metadata with file handles
in thread Storing metadata with file handles

That's perfect. Exactly what I was looking for.

An 8 bit man in a 32 bit world.

  • Comment on Re: Re: Storing metadata with file handles

Replies are listed 'Best First'.
Re3: Storing metadata with file handles
by blakem (Monsignor) on Oct 04, 2002 at 19:02 UTC
    And if you want to get really evil (read nonportable, and somewhat unreliable) you can sometimes associate the filenum back to a filename. Warning: this code is fragile, won't always work, and will only work on unix.
    my $fileno = fileno($fh); my $filename = readlink("/dev/fd/" . $fileno);
    See: Re: Re: Can you delete a file by descriptor?

    -Blake