Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!uunet!rbj From: rbj@uunet.UU.NET (Root Boy Jim) Newsgroups: comp.lang.perl Subject: Re: Simplifying paths. A hairy regex Message-ID: <124709@uunet.UU.NET> Date: 4 Mar 91 20:51:47 GMT References: <11249@cae780.csi.com> Organization: UUNET Communications Services, Falls Church, VA Lines: 19 In article <11249@cae780.csi.com> muir@csi.com (David Muir Sharnoff) writes: ?I wanted to get rid of extra junk from unix filenames. Why bother? ?To that end, I tranform: ? ? a//c -> a/c ? a/./c -> a/c ? a/c/. -> a/c ? a/b/../c -> a/c ? a/c/d/.. -> a/c Beware: a/b/../c is not always a/c if b is a symlink. This bothers some people, but not others. -- [rbj@uunet 1] stty sane unknown mode: sane