I got your point on interpolation problem with $res->content. But even after replacing it with
print "\nResponse = ", $res->content, " \n";
I am still not getting the exact contents. I'm not getting any output for $res->content. I even tried print "Response = ".$res->as_string(); but it gives me some errors regarding unavailability of HTML/HeadParser.pm. Any idea on this.