The following is the data I am working on:
__DATA__
Node 1:
98 debug : fill 100
102 debug : fill 104
Node 2:
88 debug : fill 120
152 debug : fill 164
I want to write a regex/(or whatever is appropriate) to capture information from data below Node 1, say '98 : 100', but only after identification of Node 1 and store it in an array say @value1 (i.e.values in @value1 correspond to data below Node 1). And similarly capture and store information from data below node 2, say 152 : 164, after node 2 has been identified in a different array say '@value2'. The regex I am using to capture information is
"qr/\s+([0-9]{2,3})\s[a-z]+\s(:)\s[a-z]\s([0-9]{3})/
". But, if I use an 'if' statement
while (<>){
if ($_=~ /Node 1/){
#capture information using regex
}
}
before regex, script doesn't return any value probably because it searches or regex in same line after word "Node".
Any suggestions on how to jump to the next line after identification of particular node and capture information using regex.