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