You are looking for split:
open( FILE, "bingo_in.txt" ) or die $!;
while (<FILE>) {
# chomp; - isn't needed as pg points out in the node following up.
my @words = split; # no arguments: split $_ on white space
foreach my $word (@words) { ...
Cheers, Sören
Update: chomp-line commented out
In reply to Re: How do you place words from a sentence into an array?
by Happy-the-monk
in thread How do you place words from a sentence into an array?
by Diakoneo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |