in reply to Preventing duplicate info from being pushed into an array

To slightly simplify what FunkyMonk said, if you're not concerned about preserving the order the matches were found:

my @Book = (); my %MatchFound; foreach (@Book) { $MatchFound{$_}++ if ( /\bPerl\b/i && /\bMonks\b/i && /\bRule\b/i ); }

or even

my @Book = (); my %MatchFound = map{ $MatchFound{$_}++ if ( /\bPerl\b/i && /\bMonks\b +/i && /\bRule\b/i ) } @Book;

Both, alas, are untested...