How could I get some part of url?
For example:
http://www.facebook.com/xxxxxxxxxxx http://www.stackoverflow.com/yyyyyyyyyyyyyyyy
I
I found a way:
my @urls = qw( http://www.facebook.com http://www.sadas.com/ ); for my $url (@urls) { $url =~ s/^https?:(?:www\.)?//ig; $url =~ s{/.*}{}; print "$url\n"; }