test$ grep '#/INT' dir1list.pl -A1 -B3 } my $rule = Path::Iterator::Rule->new; if ($id =~ /^([0-9A-F]{2})/) { $rule->and( sub { m#/INT $1# } ); }