perl6 Socket: 发送HTTP请求
sub MAIN(Str $host,Str $path, Int $port) {
my $send = "GET $path HTTP/1.1\r\nHost: $host\r\n\r\n";
my $c = IO::Socket::INET.new(:host($host), :port($port));
$c.print: $send;
while (my $buff = $c.recv(1024)) {
say $buff.print;
}
$c.close;
}