Solved

Checking if a file is there

Posted on 2001-08-12
2
127 Views
Last Modified: 2013-12-25
Using perl how can i check if a file exists on the server
0
Comment
Question by:kplonk
2 Comments
 
LVL 3

Accepted Solution

by:
bigbed earned 50 total points
ID: 6379305
if ( -e 'fullpathnametofile' )
{
    # do stuff here
}

other tests include:
-d : directory
-f : plain file
-w : file is writable
-x : file is executable
-r : file is readable
-z : file has zero size
-s : file has non-zero size

have fun
0
 

Author Comment

by:kplonk
ID: 6401743
Thanks did the job nicly
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question