in reply to perl unpack and matching the unpacked data

If you run your program with warnings enabled, Perl will tell you that 00A0 (for example) does not look like a number, but is used with the numeric compare ("==") operator. Most likely you want to use the string compare operator, eq.

Replies are listed 'Best First'.
Re^2: perl unpack and matching the unpacked data
by crusty_collins (Friar) on Jul 17, 2014 at 17:52 UTC

    I noticed that you are using a regular expression

    if ($data =~ "008A")

    I agree with james28909 says you need to use a eq