in reply to Regex to find the number of positive, negative, and 0 integers within a data set

Firing up the regex engine to make a simple numeric comparison is like using a blunderbus to swat flies.

This is probably an order of magnitude more efficient:

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

Output:

C:\test>1183178.pl Neg:3 Zero:1 Pos:7

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.