hossman's right, it would be interesting to know whether the door was open or closed - and presumably $meow contains this info - the scanner will read a different code (unless it's a palindrome) for open or close, no? Tell us more about your door!
IIRC, barcodes have some checkbit system, so they cannot be read differently in both directions..
maybe get two cuecats mounted in different directions with different barcodes to read each direction