in reply to regex a url
An alternative directly using a regexp is to use the URI::URL (or even just the URI) module.
This module is especially handy when when dealing with and manipulating URLs.
use URI::URL; my $url = URI::URL->new('http://www.merchandisemarket.net/shop/s_image +s/aaa_small.gif ') my ($filename) = ($url->path_segments)[-1];
|
---|
In Section
Seekers of Perl Wisdom