This will only print data for RULE=1. Inside the if loop, you can do whatever you'd like with $_.use strict ; use warnings ; my $rule=1 ; while(<DATA>) { if(/RULE=$rule/../^END$/) { print } }
In reply to Re: Reading a part of text file between markers
by manav
in thread Reading a part of text file between markers
by tariqahsan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |