in reply to Re^3: Print lines based on matching words
in thread Print lines based on matching words
while (defined(my $line = <$fh>)) { next if $line =~ /^access-list .*\bremark\b/; given ($line) { when (/^access-list/) { # take the next word followed by object-group /object-group\s/; my @after = split(/\s/,$'); my @keys = @after; push @lists, {groups => \@keys, line => $line}; } ............... } }
|
|---|