Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: A better way? Extracting filename from url

by archen (Pilgrim)
on Jan 14, 2002 at 19:38 UTC ( #138587=note: print w/ replies, xml ) Need Help??


in reply to A better way? Extracting filename from url

I've made a few programs which deal with filenames of URL's and I take the same approach as you, although I use a slightly different method. To me it's more important that you use what you're comfortable with since you're the one that will probably be reading the code later.

$subject="http://www.spied.co.nz/thinmailer.cgi"; $filename = (split(/\//, $subject))[-1]; print $filename;


Comment on Re: A better way? Extracting filename from url
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://138587]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2014-12-26 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls