There could be a non-printing character before the comma that is causing your match to fail; I inserted a NULL which doesn't show up when you print the line. You can inspect each character using split along with ord and sprintf inside a map, printing the ordinal value of each using say.

$ perl -E ' $_ = qq{PID: \0, VID: 255, SN: AGM163923J5}; say; say for map {sprintf q{0x%02x}, ord } split m{};' PID: , VID: 255, SN: AGM163923J5 0x50 0x49 0x44 0x3a 0x20 0x00 <-- the unseen NULL 0x2c 0x20 0x56 0x49 0x44 0x3a 0x20 0x32 0x35 0x35 0x2c 0x20 0x53 0x4e 0x3a 0x20 0x41 0x47 0x4d 0x31 0x36 0x33 0x39 0x32 0x33 0x4a 0x35 $

I hope this is helpful.

Cheers,

JohnGG


In reply to Re: Print unless behaving strangely by johngg
in thread Print unless behaving strangely by chrisayres11

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.