my $number = 02; while ( <DATA> ) { last if /^$number/; } while ( <DATA> ) { last if /^\d+/; print if /^-/; } __DATA__ 01 - three cans - one file - three balls 02 - none - yes coffee 03
I hope this helps...
Dave
In reply to Re: regex issue
by davido
in thread regex issue
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |