you have using "$based_url" variable in my
$status=getstore($based_url,$filename); but you have declare "$base_url"

it's always better using  'use strict' and warnings pragma...



-----Original Message-----
From: Franklin [mailto:[EMAIL PROTECTED]
Sent: Monday, October 11, 2004 3:18 PM
To: [EMAIL PROTECTED]
Subject: why can't getstore function overwrite the existing file?


Hello:
I have encounter a very strange problem. I have the following script:

use LWP::Simple;
use URI;

$base_url="http://finance.yahoo.com";;
$filename="finance.htm";
while(1)
{
my $status=getstore($based_url,$filename);
if(is_success($status)){
print "good\n";
}
else
{
print "bad\n";
}
sleep 300;
}

So this scipt is supposed to fetch the newest finance.yahoo.com
webpage every five minutes and store it. But everytime I started
it,waited for several hours and stopped it later, the stored
finance.htm is always the the first time captured file. What is wrong
with my scipt?(I run it at freebas platform)

Thank you very much in advance!
Franklin

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to