#!/usr/bin/perl use strict; use warnings; # print the next word followed by object-group while () { print if ! /\bremark\b/; }