I am trying to grab the url without the protocol or the www. For example if you have http: I just want google.com. I am currently using $line =~ /[^\n\r]+.(?=[\s\.,])/ Can anybody give me some suggestions? Thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
while(<DATA>) {
my ($field) = m#(?:[^:]://(?:[URL unfurl="true"]www\.)?)(.*)#;[/URL]
print "[$field]\n";
}
__DATA__
[URL unfurl="true"]http://www.google.com[/URL]
[URL unfurl="true"]http://www.tek-tips.com/viewthread.cfm?qid=1247777&page=1[/URL]
[URL unfurl="true"]http://www.perl.com[/URL]
[URL unfurl="true"]http://perl.com/index.html[/URL]
[URL unfurl="true"]http://somethingotherthanwww.perl.com[/URL]