Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This works fine. However, if I try enclosing it in a while ...#!perl -w use Win32::Internet; my $addr = "http://somewebaddress.com/prog.cgi?parameters"; my $INET = new Win32::Internet(); my $url = $INET->FetchURL($addr); $INET->Close(); print $url; ... etc ...
It runs fine, but the data ($url) is exactly the same - and I know it isn't. Obviously I need to clear the variables out. I've tried setting them to undef before the sleep but that doesn't have any effect. Appreciate any guidance.#!perl -w use Win32::Internet; my $addr = "http://somewebaddress.com/prog.cgi?parameters"; while (1) { my $INET = new Win32::Internet(); my $url = $INET->FetchURL($addr); $INET->Close(); print $url; sleep 180; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to Properly Clear Variables for reuse in a loop
by ikegami (Patriarch) on Apr 23, 2009 at 22:01 UTC | |
|
Re: How to Properly Clear Variables for reuse in a loop
by Anonymous Monk on Apr 23, 2009 at 22:06 UTC | |
by Anonymous Monk on Apr 23, 2009 at 22:30 UTC | |
|
Re: How to Properly Clear Variables for reuse in a loop
by linuxer (Curate) on Apr 23, 2009 at 22:12 UTC |