Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Surprised by split

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


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

That would cause a problem if $opt_d equals ^. Perl seems to handle the cases /[-]/, /[[]/, /[]]/ as the appropriate single character class, but it trips on /[^]/. I wonder whether that's a bug (or a yet unimplemented feature).

Of course, you can get all sorts of unexpected nonsense if $opt_d is longer than a single character. Or if it's the empty string.

Replies are listed 'Best First'.
Re^4: Surprised by split
by sk (Curate) on Aug 11, 2005 at 16:59 UTC
    Thanks for the info on pitfalls!!! For me, usually it is from a well behaved/nicely formatted data and almost always contains one of the following delimiters ",","\t","|"," ",":"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found