Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Collapsing paths

by ikegami (Patriarch)
on Dec 05, 2007 at 21:53 UTC ( [id://655230]=note: print w/replies, xml ) Need Help??


in reply to Re: Collapsing paths
in thread Collapsing paths

It wouldn't hurt to make the loop more obvious.

1 while $path =~ s{(^|/)(\w+/\.\./|\./)}{$1};

It's even shorter.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-24 07:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found