Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Splitting blunder

by perlplexer (Hermit)
on Apr 08, 2002 at 18:18 UTC ( [id://157506]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://157506]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-19 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found