in reply to classifying data

How about this:

#!/usr/bin/perl -w use strict; my @data = qw/ this123isnot -$100 100_00 100$00 10000 +$100 $+100 this + is not /; foreach (@data) { if (/^(?:(?:[-+]?\$?)|(?:\$?[-+]))(?:\d{1,3}(?:,\d{3})*|\d+)(?:\.\ +d{1,2})?$/) { print "$_ : numeric!\n"; } else { print "$_ : non-numeric!\n"; } }

Remember, if you don't need the $1, $2, etc... variables, use (?: ) which are faster since they don't save the result.
This looks for the begginning of line, then an optional - or + followed by or preceded by a $. Then \d{1,3}(?:,\d{3})* looks for 1-3 digits followed by a , followed by 3 digits OR \d+ one or more digits. Then for the decimal, we check for the optional \.\d{1,2}? then the end of line.
Also be careful, your original regex will match ^$ as well since everything is optional.