chitownclone
Programmer
I am attempting to create a spider to do some data mining on the internet. I want my .pl program to open a page on the web, put the text into an array, and write it to a text file.
Using the code below, I can't seem to get any data into the array, but if I change $url to
"C:/website/myweb.com/file.html" is works fine. What do I have to do to make it work for a web page that I do not know the root C: directory and just know the URL.
$url = "
open (READ, $url)
@raw_data=<LOGIN>;
close(READ);
open (WRITE, ">>C:/Websites/myweb.com/files/write.txt")
foreach $log(@raw_data) {
print WRITE "$log\n";
}
close (WRITE);
Using the code below, I can't seem to get any data into the array, but if I change $url to
"C:/website/myweb.com/file.html" is works fine. What do I have to do to make it work for a web page that I do not know the root C: directory and just know the URL.
$url = "
open (READ, $url)
@raw_data=<LOGIN>;
close(READ);
open (WRITE, ">>C:/Websites/myweb.com/files/write.txt")
foreach $log(@raw_data) {
print WRITE "$log\n";
}
close (WRITE);