#!/usr/bin/perl -w use strict; while () { next if ($_ !~ /([A-Za-z])\1/); print; } __DATA__ balloon hello world foo bar perlmonks merry christmas