in reply to Regex - one and only one / at beginning and end of file path

There has been discussion about this before. If memory serves me correctly, the two regexes are faster than one big one. Also, since you're only killing one character off of the end, it may even be faster to do something crazy like:

s/^\//; { local $/='/'; chomp; }

Didn't read the question correctly the first time. Sorry.