http://qs321.pair.com?node_id=250884


in reply to directory or file?

Use the filetest operators which are described in perldoc perlfunc. -f FH or -f "filename" returns true for a normal file. -d "filename" returns true for a directory. There are many others that return various pieces of information about the specified file.

90% of every Perl application is already written.
dragonchild

Replies are listed 'Best First'.
Re: Re: directory or file?
by Fletch (Bishop) on Apr 16, 2003 at 13:39 UTC

    perldoc -f -X will bring up the specific entry from perlfunc on the test operators. See also perldoc -f stat, or perldoc File::stat for the OOPy in the audience.