http://qs1969.pair.com?node_id=157506


in reply to Splitting blunder

Not sure how you can get blanks for all of them...
The first two elements will always be blank since Server name is always preceded by '\\'...
Here is what you could do to avoid that
# example 1 @tmp = split /\\/, substr($string, 2); print join(',', @tmp), "\n"; # example 2 $string =~ s/^\\+//; @tmp = split /\\/, $string; print join(',', @tmp), "\n"; # example 3 @tmp = split /\\+/, $string; shift @tmp; print join(',', @tmp), "\n";

--perlplexer