CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: why the "get" does not bring: Edit Log



zafar
New User

May 15, 2011, 10:26 AM


Views: 2742
why the "get" does not bring


Code
 # htdocs URL accessibility 
my $res = $ua->get("$f->{srv_htdocs_url}/index.html");
push @tests, $res->content eq 'XFS' ? 'htdocs URL accessibility: OK' : "htdocs URL accessibility: ERROR (should see XFS on <a href='$f->{srv_htdocs_url}/index.html' target=_blank>link</a>)";


I could not understand why the "eq"does not work and why the "get" does not bring the page content correctly.



Code
 # htdocs URL accessibility 
my $res = $ua->get("$f->{srv_htdocs_url}/index.html");
push @tests, $res->content eq 'XFS' ? 'htdocs URL accessibility: OK' : "htdocs URL accessibility: ERROR (should see XFS on <a href='$f->{srv_htdocs_url}/index.html' target=_blank>link</a>) {$res->content}";


Checking the value returned by the variable {$ res-> content} "was" {HTTP:: Response = HASH (0x122c810) -> content} "but the page only has the text" XFS ".


(This post was edited by zafar on May 16, 2011, 4:29 AM)


Edit Log:
Post edited by zafar (New User) on May 16, 2011, 4:29 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives