diff MPIWGStor.pm @ 30:398ef4b8f072

added -online-base option to makemeta-lib
author casties
date Mon, 12 Jun 2006 19:01:39 +0200
parents 2890dd75d2f6
children 4d958249d337
line wrap: on
line diff
--- a/MPIWGStor.pm	Tue May 16 21:56:32 2006 +0200
+++ b/MPIWGStor.pm	Mon Jun 12 19:01:39 2006 +0200
@@ -155,15 +155,20 @@
 
 
 #
-# $name = sstrip($name)
+# $name = sstrip($name, $slash)
 #
 # strips leading and trailing whitespace from $name
+# replaces double slashes with single ones with $slash.
 #
 sub sstrip {
-    my ($name) = @_;
+    my ($name, $slash) = @_;
     
     if ($name =~ /^\s*(.*?)\s*$/) {
-	return $1;
+	$name = $1;
+    }
+    if ($slash) {
+	# trim multiple slashes
+	$name =~ s/\/+/\//g;
     }
     return $name;
 }