perl -nlwe 'print $1 if /\bit\b(.*[.?,])$/' text-file