--- scaleomat/scaleomat.pl 2004/11/18 20:10:17 1.4 +++ scaleomat/scaleomat.pl 2004/11/18 20:15:09 1.5 @@ -130,20 +130,22 @@ sub findfile { return; } - +# +# $p = cleanpath($path, $startslash). +# +# returns a pathname with trailing and starting slash removed (if +# $startslash is true the starting slash is not removed) +# sub cleanpath { my ($path, $startslash) = @_; if ($path =~ /^(\/)*(.*?)\/*$/) { if ($startslash) { - print "$path --> $1$2\n"; return $1 . $2; } else { - print "$path --> $2\n"; return $2; } } - print "hä? $path\n"; return $path; }