use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new( requests_redirectable => [], ); my $res = $ua->get( shift ); print $res->status_line, "\n", 'Location: ', $res->header( 'location' ), "\n"; __END__ bricas@bricas-laptop:~$ perl red.pl http://bit.ly/gf4h1 301 Moved Location: http://github.com/rjbs/tpf-grant-history/blob/master/history.txt