echo "/home/code/work"|\ perl -pe's|(/[^/]+)|$`$1 |g'