in reply to how do I remember the trailing /
also, look at perlre(to see what $ means in a regex), and perlop (for the m/// operator)
which should lead you to something like:
orif(length $foo > 1 and substr($foo,-1,1) ne '/') { $foo .= '/'; }
btw - if you aren't used to the unless syntaxt above, see perlsyn$foo .= '/' unless($foo =~ m/\/$/);
|
|---|