in reply to Manipulating directory paths
Try this...
$path =~ s{ /log/ .* \z }{/}xms;
Note that if your path has "/log/" in it twice or more, this will strip off everything after the first one. If you want to strip off everything after the last one, this seems to work:
$path =~ s{ (.*) /log/ .* \z }{$1/}xms;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Manipulating directory paths
by pp (Novice) on Sep 07, 2007 at 18:46 UTC | |
by ikegami (Patriarch) on Sep 07, 2007 at 18:55 UTC | |
by pp (Novice) on Sep 07, 2007 at 19:03 UTC | |
by ikegami (Patriarch) on Sep 07, 2007 at 19:05 UTC | |
by pp (Novice) on Sep 07, 2007 at 19:19 UTC | |
by pp (Novice) on Sep 13, 2007 at 16:35 UTC | |
by ikegami (Patriarch) on Sep 13, 2007 at 16:58 UTC | |
by pp (Novice) on Sep 13, 2007 at 18:14 UTC | |
|