http://www.perlmonks.org?node_id=1193865


in reply to Turning a questionable string into a number

Based on what you've shown us that is quite strange. Are you sure you're grabbing the correct field with $data[12], and have you looked at the hex dump of the entire line? Could you provide us with enough data to reproduce this, like an entire line of input from your file? Have you by any chance reduced the code that you're showing us a little too much, like perhaps you use the ^, |, or & operators somewhere (the latter two maybe accidentally instead of || resp. &&)? See also Short, Self-Contained, Correct Example. Update: Oh yes, and please turn on $Data::Dumper::Useqq=1; or use Data::Dump instead.