#! perl -slw use strict; my @counts; ++$counts[ 1+ ( $_ <=> 0 ) ] while ; printf "Neg:%d Zero:%d Pos:%d\n", @counts; __DATA__ 29 -62 696 242 78 -564 0 45 855 22 -67