[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Slightly OT :perl file exists test
On Wed, 2004-05-12 at 11:44, Chris Johnson wrote:
> Can anyone provide me with a couple of lines of perl to test whether a file
> exists or not please. I think I could work it by doing an "open or die" but
> I seem to remember this wasn't a very efficient way of doing it. I'm
> editing the cgi scripts for Dansguardian on IPCop so that links to edit the
> "included" files are presented at the bottom of each "edit file" page.
Have a look at the documentation at www.perl.org regarding file opening
and closing. The return values from these functions will do what you
want.
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.