Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Splitting a String

by damian1301 (Curate)
on May 18, 2001 at 05:00 UTC ( #81404=note: print w/ replies, xml ) Need Help??


in reply to Splitting a String

@array=split/\|/,$str;

You have to backslash it because it is used in regular expressions as a logical or.

NOTE:This could have been found out by using the tutorials, super search or just looking through the archives...

Tiptoeing up to a Perl hacker.
Dave AKA damian


Comment on Re: Splitting a String
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2015-07-04 23:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls