eatr
Technical User
- Jan 20, 2006
- 48
I'm trying to parse a file that has similar data in different sections; thus I need to set limiting conditions or there will be overmatching.
Problem is I can figure out the exact syntax.
I've read a file into an array and am looping through each line of the array. I want to use a WHILE or UNTIL to limit my search; in this case for single (or double) digit numbers between two word characters (one of which I know).
so,
foreach my $line (@array) {
while (1st word .. 2nd word) { # need exact syntax here
if ($line =~ /expression here/ {
......
thanks
Problem is I can figure out the exact syntax.
I've read a file into an array and am looping through each line of the array. I want to use a WHILE or UNTIL to limit my search; in this case for single (or double) digit numbers between two word characters (one of which I know).
so,
foreach my $line (@array) {
while (1st word .. 2nd word) { # need exact syntax here
if ($line =~ /expression here/ {
......
thanks