use strict; use warnings; my (@numbers, $handle); open ($handle, "c:/documents and Settings/david price/my documents/cingular.txt") || die "cannot open: $!"; @numbers = <$handle>; close ($handle); for (@numbers) { if (index($_, '9432') != -1) { print "match found\n"; } else { print "match failed\n"; } }