#!/usr/local/bin/perl use strict; use warnings; use LWP::UserAgent; my $url = 'https://www.exmaple.org'; my $ua = LWP::UserAgent->new; my $req = HTTP->Request.new(GET => $url); my $res = $ua->request($req); use Data::Dumper; say Dumper($res->header);