$path =~ s!([^/])$!$1/!;