in reply to putting text into array word by word
Try:
# Use read mode instead of write and append mode open FILE, "<", "input.txt" or die $!; print "file loaded \n"; my @all_words; while (<FILE>) { # the words from *this* line my @words = split('', $_); # add to the complete word list push @all_words, @words; }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: putting text into array word by word
by jms53 (Monk) on Jan 09, 2012 at 18:30 UTC | |
by Eliya (Vicar) on Jan 09, 2012 at 18:44 UTC | |
by roboticus (Chancellor) on Jan 09, 2012 at 18:35 UTC |