http://www.perlmonks.org?node_id=1008228


in reply to LWP Question

You might find this useful:
#!/usr/bin/perl -l use strict; use warnings; use IO::Handle; use LWP::UserAgent; my $url = 'http://bit.ly/gf4hl'; my $ua = LWP::UserAgent->new( requests_redirectable => [], ); $ua->show_progress(1); my $res = $ua->get($url); print $res->request->uri->as_string; print $res->header('location');