Skip to content

Instantly share code, notes, and snippets.

@monmon
Created December 22, 2010 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monmon/751157 to your computer and use it in GitHub Desktop.
Save monmon/751157 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use LWP::UserAgent;
use Socket;
use Data::Dumper;
BEGIN {
*inet_aton = \&Socket::inet_aton;
}
use Coro::LWP;
#*Socket::inet_aton = \&inet_aton;
*Coro::Util::inet_aton = \&inet_aton;
my $url = shift || "http://www.google.co.jp";
print LWP::UserAgent->new->get($url)->code;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment