in reply to alphabet counting
You are printing inside your loop.
You want to accumulate your values and then only print them after you are done.
As an aside, it would be more perlish if you were using a hash to accumulate your values... you could change all your ifs to a single line.
And it's probably not a good idea to call the filehandle IN when you are using it for output.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: alphabet counting
by Anonymous Monk on Jun 02, 2012 at 14:09 UTC | |
by sauoq (Abbot) on Jun 02, 2012 at 14:19 UTC | |
by Not_a_Number (Prior) on Jun 02, 2012 at 21:11 UTC | |
by sauoq (Abbot) on Jun 02, 2012 at 22:32 UTC | |
by BrowserUk (Patriarch) on Jun 02, 2012 at 22:47 UTC |