I have been working away at a problem for some time now. I've gotten down to probably the last hoop I need to jump through, and I could really use some help. I'm capturing a stream (scalar) through the Net::Telnet module. This stream contains multiple lines, which are split up by a special character (hex value is 0a, see the output of Dump_Log below). I need help in understanding how to match on it so that I can run the scalar through the "split" function to break it up into an array. That's it. That's what I need to know. I've included my attempt at coding this, which is not working for some strange reason. I'm hoping someone here can see the error I've made. Thanks for any help.

Code snippet using 'hex' to determine the value to match on:
$results = $obj->waitfor($cmd); $break = hex '0a'; @return_lines = split ( $break, $results ); print @return_lines

Just a few lines from Dump_Log, what looks like a period is actually the line break, and it maps to 0a as you can see.
< 0x000d0: 20 75 6e 6c 69 6d 69 74 65 64 20 20 20 30 0a 75 unlimi +ted 0.u < 0x000e0: 73 65 72 31 20 20 66 61 6c 73 65 20 67 65 6e 5f ser1 f +alse gen_ < 0x000f0: 75 73 65 72 20 67 65 6e 5f 75 73 65 72 20 75 73 user ge +n_user us < 0x00100: 65 72 31 40 67 6d 61 69 6c 2e 63 6f 6d 20 20 20 er1@gma +il.com < 0x00110: 75 73 65 72 31 20 20 20 20 20 20 75 6e 6c 69 6d user1 + unlim < 0x00120: 69 74 65 64 20 20 20 30 0a 0a 20 47 72 6f 75 70 ited +0.. Group

In reply to Matching a hex value in a string... by s2cuts

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.