in reply to When is 03 not equal to 03?

It's not much consolation, but it should work. Perl should be forcing your variables into numerical context if necessary, so that the comparison shd be ok with either == or eq. I'd be interested to see how $this_category is defined, but I've tried defining it all different ways and I can only get your error message by defining it as "04"!

I'm using ActivePerl 5.6.1.629, however, which may make the difference.

§ George Sherston