Hi,
You would just do:
my $url = $_[0];
my @tmp = split /\//, $url;
return $tmp[2];
}
Also, that will split the http:// bit up (thus why I changed it to $tmp[2], instead of $tmp[0]). If you want to use the http:// bit in the front, you would just need to change:
..to:
Hope that helps.
BTW, please try not to use bold in your whole post, it makes them a bit sore on the eyes :(
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
You would just do:
Code:
sub { my $url = $_[0];
my @tmp = split /\//, $url;
return $tmp[2];
}
Also, that will split the http:// bit up (thus why I changed it to $tmp[2], instead of $tmp[0]). If you want to use the http:// bit in the front, you would just need to change:
Code:
return $tmp[2];..to:
Code:
return qq|http://| . $tmp[2];Hope that helps.
BTW, please try not to use bold in your whole post, it makes them a bit sore on the eyes :(
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!