in reply to question on perl's split function

if you only want the none empty strings, then you can achieve it like this:
my $string = "///a/b////c"; my @arr = grep {$_ ne ''} split("\/+",$string); print ":" , join("_",@arr) , ":\n";
Also: moritz is right, that /* matches 0 or more slashes, so it would also split the string where you wouldn't expect it to split the string. Simply try using the following string with your split regex of /*:
my $string = "//foo//bar///";
then you'll understand the problem. + is what you need as it matches 1..n ocurrences of the previous char.