9 lines
239 B
Perl
9 lines
239 B
Perl
|
#! /usr/bin/perl
|
||
|
use strict;
|
||
|
use LWP::UserAgent ();
|
||
|
my $ua = LWP::UserAgent->new(agent => "curl");
|
||
|
my $url = "https://ifconfig.io";
|
||
|
my $req = HTTP::Request->new('GET' => $url);
|
||
|
my $res = $ua->simple_request($req);
|
||
|
print($res->content());
|