I don't know if this repeats advice given previously because a possible source of the problem is glaringly evident: you never chomp the input, $po_alv and your regular expression checks only for a single digit in the var. It could still hold anything else... or nothing else. Either, or both, could produce the message you cite
(And, BTW, put error and/or warning messages, verbatim, inside code tags -- just as you do with code.)
If you didn't program your executable by toggling in binary, it wasn't really programming!