http://qs321.pair.com?node_id=1211173


in reply to Script stopped working...

I'm surprised you got a response at all.

Your declaration of "my $url" is out-of-scope by the time you attempt to get $content:

while(1) { my $url="https://cucxnpub/vmrest/users?rowsPerPage=2000\&pageNumber= +$page"; $ua = LWP::UserAgent->new(ssl_opts => { SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE, verify_hostname => 0, }); #<<<< $url is OUT of scope $header = HTTP::Headers->new; $req = HTTP::Request->new(GET => $url); #IF you had "use strict", th +is would show an error.
Please do your self a favour and add this to the top of you script:
use strict; use warnings;
I also dont know why the "while (1)" is being used.
You should be setting the user agent up only one time, not in an indifinete loop.

I don't know how you are able to exit that loop.

If you are sure you have got past the URL issue, and are able to fetch $content, we can work on the remainder of the script, if you pshow us a sample of the $content.

Depending on what you are pulling data from, Cisco::IPPhone may be relevant.

Update:Thanks , gentoobob,syphillis and Marshall for pointing out that I mistook a mis-indentation for $url being out of scope. It is not.

                Python is a racist language what with it's dependence on white space!