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.
my $url = URI::URL->new('http://www.merchandisemarket.net/shop/s_image
my ($filename) = ($url->path_segments)[-1];