Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2023-12-06 03:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (29 votes). Check out past polls.

    Notices?