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

Re: capture groups are not working -- why??

by a (Friar)
on Jun 05, 2013 at 19:42 UTC ( [id://1037288]=note: print w/replies, xml ) Need Help??


in reply to capture groups are not working -- why??

Just a good idea:
my ($YY,$MM,$DD,$HH,$MI,$SS) ; $_ = $line1; /^Current time =>\s(\d\d\d\d)(\d\d)(\d\d)\S(\d\d)(\d\d)(\d\d)/sx ;
Test your matches (esp. if you're unsure about the data) so you can respond if it fails
if ($line1 =~ /^Current time =>\s(\d\d\d\d)(\d\d)(\d\d)\S(\d\d)(\d\d)( +\d\d)/sx ) { # assign your captures ... } else { # warn about failing to match warn("No Match: $line1\n"); }

a

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-19 16:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found