in reply to if (open(FH, $path)) { ?

Well, it's fine, but one tweak I would make is to add the $! variable (and maybe the filename) in the error message, e.g.
print "Can't open $filename for reading - $!";

Replies are listed 'Best First'.
Re: Re: if (open(FH, $path)) { ?
by bkiahg (Pilgrim) on May 03, 2004 at 14:20 UTC
    I would do it that way but I don't want users who don't have access to the file to realize they don't. I'm setting up links to edit the current page.
      In that case, don't print anything if the open fails.