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')
A foolish day
Just another day
Internet cleaning day
The real first day of Spring
The real first day of Autumn
Wait a second, ... is this poll a joke?
Results (466 votes),