Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: how to remove everything before last slash in perl?

by Jim (Curate)
on Jun 24, 2012 at 02:34 UTC ( #978029=note: print w/ replies, xml ) Need Help??


in reply to Re^2: how to remove everything before last slash in perl?
in thread how to remove everything before last slash in perl?

The fact that you began with this…

s{.*(/)}{$1};

…and ended up with this…

s{^.*/}{};

…makes me suspicious that you both started and ended by using someone else's regular expression pattern, and that you understand neither one.

My advice: Avoid copy and paste programming. Sometimes, it's better to figure out how to do something yourself than it is to ask someone else how to do it. You learn more this way.


Comment on Re^3: how to remove everything before last slash in perl?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-09-01 15:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (14 votes), past polls