Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Question: Capturing a repeated pattern

by BrowserUk (Pope)
on Apr 08, 2010 at 22:34 UTC ( #833654=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Question: Capturing a repeated pattern
in thread Question: Capturing a repeated pattern

You could always match first and then split:

$s = 'somename 1000 0.24 280 2 2576.9 2731.9 12.0 4195.3';; $s =~ m[\w+(?:\s+(?:\d+\.)?\d+){8}] and @a = split ' ', $s and shift @a and print "@a";; 1000 0.24 280 2 2576.9 2731.9 12.0 4195.3

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^3: Question: Capturing a repeated pattern
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2015-07-06 06:46 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 (70 votes), past polls