in reply to Optimizing a regex
If doing numeric comparisons, strings with no digits are equal to 0. So $ha equals 0 as does "". If you turn on warnings this will be pointed out. Now if no-one else has done your regex, I'll look at that more closely.$ha = "hi"; if ($ha == "") { print "hello\n"; }
|
|---|