in reply to How do you place words from a sentence into an array?
So you want to iterate through each word in a file doing some processing on it? Try this:
open(my $fh, "< bingo_in.txt") || die "Couldn't read file: $!\n"; while(<$fh>){ foreach my $word (split){ #process word } }
May the Force be with you
|
---|
In Section
Seekers of Perl Wisdom