use URI::URL (); my $url = URI::URL->new($url_as_string) or warn "URL error"; print $url->port
$url_as_string would be the full URL you are parsing, such as http://www.example.com/ or http://www.example.com:8080/url.html.
In reply to Re: Determining foreign port number
by tomhukins
in thread Determining foreign port number
by jjdeterick
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |