Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 chanting in the Monastery: (2)
As of 2015-02-02 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    On my keyboard, Caps lock is:








    Results (16 votes), past polls