Mike <[EMAIL PROTECTED]> wrote:

: To elaborate, I had to set 2 path variables. One to
: define the absolute path of the uploaded image files on
: the web server, and the other to define the relative
: path (from the perl program) to the image files.

    There is no need to use relative paths from the perl
program. You can use absolute paths for the whole site
unless you move directories often. Define a subroutine
which adds the file system root to the absolute path
from the web root.

    For example:

C:\example\home\ is web root on file system
/images/         is the image directory
/code/perl/      is where the perl code resides

A relative path might look like "../../image/file.png"
The absolute path would be:     "/image/file.png"

    In code you could write a sub routine for
existence:

sub exists {
    return -e "C:/example/home$_[0]";
}

    Feed it an absolute path from the web root:

$filename = '/images/file.jpg';

if ( exists( $filename ) ) {
    #
    # Do something with $filename
    #
}

HTH,

Charles K. Clarkson
-- 
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists
254 968-8328


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to