Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How to Properly Clear Variables for reuse in a loop

by Anonymous Monk
on Apr 23, 2009 at 22:06 UTC ( #759681=note: print w/replies, xml ) Need Help??


in reply to How to Properly Clear Variables for reuse in a loop

I don't see anything in particular wrong with your code, I assume what's going on is that the library Win32::Internet connects to does caching on HTTP gets where the params are static. I know i've run into similar issues with older verions of microsoft's XMLHttpRequest object.

I'd try some thing like LWP or WWW::Mechanize which allow for more control over your request, and should be able to accomplish what you need. Another thing that may work is preventing caching by adding something like this:

my $url = $INET->FetchURL($addr."&nocache=".time());

Replies are listed 'Best First'.
Re^2: How to Properly Clear Variables for reuse in a loop
by Anonymous Monk on Apr 23, 2009 at 22:30 UTC
    Fantastic! Using this worked:
    my $url = $INET->FetchURL($addr."&nocache=".time());
    Really appreciate the responses! Thanks!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://759681]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2018-07-23 00:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (458 votes). Check out past polls.

    Notices?