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.
In reply to Re: alphabet counting
by sauoq
in thread alphabet counting
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |