my ($str1, $str2, $str3) = (split ' ', $line)[-3, -2, -1]; print if $str1 eq $str2 && $str2 eq $str3;