my $line; # start out ignoring/suppressing all output my $show = 0; # your code to open XACLS goes here while (defined($line = )) { # this bit ignores lines of stars # it also turns on output when it "sees (8) stars" if ($line =~ /^\*{8}/) { $show = 1; next; } # note: you could also turn $show on and off to # ignore entire sections, if that's what you need. # just stick the appropriate variation of the # above if-statement and have it turn $show on/off # as needed. # you can suppress other types of lines by adding # more tests, like this ... if ($line =~ /^No Auditing/) { next; } # only print if the $show flag is 1 if ($show) { print $line; } } # close XACLS here