Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Splitting blunder

by extremely (Priest)
on Apr 08, 2002 at 18:10 UTC ( #157502=note: print w/ replies, xml ) Need Help??


in reply to Splitting blunder

$s = '\\Server\user\dir'; @tmp = split /\\+/, $s; print join(" -- ", @tmp);

You're going to want to put a double backslash in to match a single, and you might want to add the '+' after it to match multiples inline.

--
$you = new YOU;
honk() if $you->love(perl)


Comment on Re: Splitting blunder
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-07-25 00:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls