in reply to Perl bug or what?

It works perfectly on one script but not on another one

How are you determining whether it's a string or a number ?
(A simple demo script would be the best way to show us.)

Cheers,
Rob