in reply to What is wrong in this

You probably want:
$a =~ /\d\d\.\d\d/ || $a =~ /\$\d\d\d\.\d\d\d/ || $a =~ /\$\.\d\d/
But there's more to say. Note that the second condition can only be true of the first condition is true, so there is no point of having the second condition. Which leaves:
$a =~ /\d\d\.\d\d/ || $a =~ /\$\.\d\d/;
You could combine the two regexes into:
$a =~ /(?:\d\d|\$)\.\d\d/;
but I'm not sure whether that's faster; and whether it's clearer and easier to maintain is debatable.
Perl --((8:>*