Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Regexp help

by frozenwithjoy (Curate)
on Nov 22, 2012 at 01:02 UTC ( #1005034=note: print w/ replies, xml ) Need Help??


in reply to Regexp help

Why not use split?

$ perl -E '$string = "0.740234|0.758789|0.748047|0.749023|0.748047|0.7 +54883|0.743164|0.748047|0.780273|0.739258|0.765625|0.761719|0.760742| +||||0.75293|0.742188"; say $_ for (split /\|/, $string); ' 0.740234 0.758789 0.748047 0.749023 0.748047 0.754883 0.743164 0.748047 0.780273 0.739258 0.765625 0.761719 0.760742 0.75293 0.742188

NOTE: Keep in mind that when matching | in split (or another regex situation), you need to escape it: \|


Comment on Re: Regexp help
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (17)
As of 2015-07-31 14:20 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 (278 votes), past polls