Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: regex a url

by count0 (Friar)
on Oct 06, 2002 at 03:39 UTC ( #203133=note: print w/replies, xml ) Need Help??


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];

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://203133]
help
Chatterbox?
[shmem]: karlgoethebier: reading? Naah... just grep :-P
[Discipulus]: ;=) can be an idea for another killing oneliner..
Eily used google. The lazy internet equivalent of grep

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2017-07-21 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (320 votes). Check out past polls.