Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: directory or file?

by pfaut (Priest)
on Apr 16, 2003 at 13:08 UTC ( #250884=note: print w/replies, xml ) Need Help??


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 (Chancellor) 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://250884]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2021-04-15 01:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?