in reply to Re: Tutelage, part two
in thread Tutelage, part two
No offense intended, but that is truly ugly. Why not a simple for loop:print join( '', map( "$_: $word_count{$_}\n", @gt_three_char_words[ 0 .. 9 ] ) ) . "\n";
for my $word (@gt_three_char_words[ 0 .. 9]) { print "$word: $word_count{$word}\n"; }
Now here is how I would have written the entire thing.You've got a couple of errors there: $word where you meant $_ in the increment loop and an extraneous ( after split.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Tutelage, part two
by diotalevi (Canon) on Jan 04, 2004 at 20:30 UTC |