liquidc00l has asked for the wisdom of the Perl Monks concerning the following question:
The script returns all the page information, but I look for the HEAD tag, the script continues on its way before receiving all the page, if I change it the look for the HTML tag it works fine. So after this long winded description, my question would be, how do I have my script wait until all the input is received back. TIA liquidc00lsub GetWebLogic { $url = "http://" . $server . ":" . $port . "/HttpController?GetPag +e=UserLogonForm"; if ($Testing eq "Yes" ) { print "Checking Dynamic Page\n"; } $ua = new LWP::UserAgent; $request = HTTP::Request->new(GET => $url); $response = $ua->request($request); if ($response->is_success) { $dynamic = $response->content; } @dynamic = split(/\n/,$dynamic); foreach $line (@dynamic) { ## Check the output of the web page for the HTML <HEAD> tag if ($line =~ /<HEAD>/i) { if ($Testing eq "Yes") { print "Found the Dynamic HTML <HE +AD> tag\n"; } $DynamicPageCheckOK = "Yes"; } if ($DynamicPageCheckOK eq "Yes") { ## Page returned do noting } else { ## Page didn't return generate an error &GenerateServerError; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Waiting for a response
by perrin (Chancellor) on Apr 10, 2002 at 19:33 UTC | |
|
Re: Waiting for a response
by wardk (Deacon) on Apr 10, 2002 at 19:35 UTC | |
by tachyon (Chancellor) on Apr 10, 2002 at 20:12 UTC | |
by wardk (Deacon) on Apr 10, 2002 at 20:40 UTC |