in reply to Processing words in a file.
I guess you need first word of each line from the file
open FH, '<', "filename.txt" or die "Can not open file $!";
my ($first_word) = $_ =~ /^(\w+)/;
if ($first_word eq 'your string')
Went to join the gridlock to see it
Held an eclipse party
Watched a live feed
I cn"t see tge kwubosd to amswr thus
I tried to see it, but 8000 miles of rock got in the way
Wanted to see it, but they wouldn't reschedule it
Read the book instead
Results (257 votes). Check out past polls.