Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2018-11-15 16:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (188 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!