in reply to Re: cwd pragma (rfc)
in thread cwd pragma (rfc)

or
substr($realpath, -length($basename)) = '' if substr($realpath, -length($basename)) eq $basename;

Replies are listed 'Best First'.
Re^3: cwd pragma (rfc)
by sh1tn (Priest) on Jun 28, 2006 at 10:25 UTC
    Maybe just
    $realpath = join(q//, split(/.[^\/]+$/,$realpath));


      The point of mine was to remove slow operations, not add new ones.