#! perl -slw use strict; my $def =<<'EOD'; bean n 1: any of various edible seeds of plants of the family Leguminosae [syn: {edible bean}] 2: any of various seeds or fruits suggestive of beans 3: any of various leguminous plants grown for their edible seeds and pods [syn: {bean plant}] 4: informal terms for a human head [syn: {attic}, {bonce}, {noodle}, {noggin}, {dome}] v : hit on the head, esp. with a pitched baseball EOD $def =~ s[\n\s+(?=[^\s:]{3})][ ]smg or warn 'no match'; print $def; __END__ c:\test>junk bean n 1: any of various edible seeds of plants of the family Leguminosae [syn: {edible bean}] 2: any of various seeds or fruits suggestive of beans 3: any of various leguminous plants grown for their edible seeds and pods [syn: {bean plant}] 4: informal terms for a human head [syn: {attic}, {bonce}, {noodle}, {noggin}, {dome}] v : hit on the head, esp. with a pitched baseball