Hey guys here's my issue:
I am interested in determining if a file exists. Here's the scenario:
1) user wants to add their engineering website to my linklist.
2) User fills in a simple form - name, eng porgram, URL of websited, etc.... and hits submit.
3) I want to verify that the URL they enter actually exists.
How do I do this?
Here is a sample of the code I am using for testing:
open(INF,"< or dienice("file does not exist: $!"
flock(INF,2);
seek(INF,0,0);
@ary = <INF>;
close(INF);
foreach $line (@ary) {
chomp($line);
print "$line";
}
I though I would start by testing a know page (it's part of my site). Then move into variables. I hope I'm not too far off here. Any suggestions would be awesome.
Thanks in advance for your help,
Michael
I am interested in determining if a file exists. Here's the scenario:
1) user wants to add their engineering website to my linklist.
2) User fills in a simple form - name, eng porgram, URL of websited, etc.... and hits submit.
3) I want to verify that the URL they enter actually exists.
How do I do this?
Here is a sample of the code I am using for testing:
open(INF,"< or dienice("file does not exist: $!"
flock(INF,2);
seek(INF,0,0);
@ary = <INF>;
close(INF);
foreach $line (@ary) {
chomp($line);
print "$line";
}
I though I would start by testing a know page (it's part of my site). Then move into variables. I hope I'm not too far off here. Any suggestions would be awesome.
Thanks in advance for your help,
Michael