Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Surprised by split

by Anonymous Monk
on Aug 11, 2005 at 18:16 UTC ( [id://483066]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Surprised by split
in thread Surprised by split

Wouldn't quotemeta avoid this problem, as well as the ones described below?

Replies are listed 'Best First'.
Re^4: Surprised by split
by sk (Curate) on Aug 11, 2005 at 19:14 UTC
    You are right! That should do it!!!

    perl -e ' $str = "hi|there"; $d = quotemeta("|"); @a = split /$d/, $st +r; print +($_,$/) for (@a);' __END__ hi there

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-18 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found