in reply to Re^2: Faster and more efficient way to read a file vertically
in thread Faster and more efficient way to read a file vertically

$i is variable in your example. Reading vertically doesn't make sense then.

I'd suggest $count{$letter}++ with a hash %count to speed things up.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!