Solved

Checking if a file is there

Posted on 2001-08-12
2
123 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now