in reply to Re: checking if a file / image exists on another server
in thread checking if a file / image exists on another server
I'm not sure if that operator is capable of doing it that way. Giving it an address without using some form of module to translate/connect/make sense of the address, it probably just checks the current directory of execution for a file with the name of that address.
Below is a test...#!usr/bin/perl -w if( -e "www.yahoo.com") { print "exists\n"; } else { print "doesn't\n"; }
I created a file called www.yahoo.com since I couldnt create it with the /'s intact. When I ran the following code with the file existing it prints exists.. after the file deleted it prints doesn't. Which is to be expected. So in short it seems more like a job for logging into another server via telnet or ssh and then checking it that way.
edit::yeah LWP::Simple will do that...sorry had never used it
|
|---|