I don't quite understand your use of the => operator.
if($var => digit) is always undefined does not evaluate $var in relation to digit. If you mean, "greater than or equal to", then your first example of >= is the correct syntax.
Update: Corrected statement above, as pointed out by Fletch.