in reply to Trouble with path syntax

Just since no one else has mentioned it, this is a case where using a different delimiter for m// makes a lot of sense. Something like m{(.*)/[^/]+} gets rid of the need for escaping the slashes.