$ perl -MLWP -le " print URI->new( $_ )->host_port for qw{ http://www.example.com http://example.com:365 }; " www.example.com:80 example.com:365