Can someone help parcing/splitting data from telnet; Code below:
@check = $telnet->cmd(String=>$RTRVPM1); $response = join(" ", @check); print $response;
print response:

EQUIP-OME1 15-08-26 01:30:54 M CTAG COMPLD "OC48-1-14-2,OC48:OPRN-OCH,36,COMPL,NEND,RCV,1-DAY,08-25,00-00,1,, +,," "OC48-1-14-2,OC48:OPTN-OCH,97,COMPL,NEND,TRMT,1-DAY,08-25,00-00,1, +,,," "ETH-1-13-1,ETH:INFRAMES-E,978758,COMPL,NEND,RCV,1-DAY,08-25,00-00 +,1,,,," "ETH-1-13-1,ETH:OUTFRAMES-E,1057147,COMPL,NEND,TRMT,1-DAY,08-25,00 +-00,1,,,," > EQUIP-OME1 15-08-26 01:30:55 M CTAG COMPLD "OTM2-1-1-1,OTM2:OPR-OCH,-10.70,COMPL,NEND,RCV,1-DAY,08-25,00-00,1 +,,,," "OTM2-1-1-1,OTM2:OPT-OCH,-6.50,COMPL,NEND,TRMT,1-DAY,08-25,00-00,1 +,,,," > EQUIP-OME2 15-08-26 01:30:56 M CTAG COMPLD "OTM2-1-3-1,OTM2:FEC-OTU,30181635949,COMPL,NEND,RCV,1-DAY,08-25,00 +-00,1,,,," "OTM2-1-3-1,OTM2:PFBERE-OTU,1E-37,COMPL,NEND,RCV,1-DAY,08-25,00-00 +,1,,,," "OTM2-1-3-1,OTM2:PRFBER-OTU,3.3E-05,COMPL,NEND,RCV,1-DAY,08-25,00- +00,1,,,," ; <

I want to print actual responses with data that start with " "" (Space Space Double Quote) but also join equipment name to data comma separated. Do until ";" (semi colon).

Example output:

EQUIP-OME1,15-08-26,01:30:54,OC48-1-14-2,OC48:OPRN-OCH,36,COMPL,NEND,RCV,1-DAY,08-25,00-00,1,,,,"

EQUIP-OME1,15-08-26,01:30:54,OC48-1-14-2,OC48:OPTN-OCH,97,COMPL,NEND,TRMT,1-DAY,08-25,00-00,1,,,,"

EQUIP-OME1,15-08-26,01:30:54,ETH-1-13-1,ETH:INFRAMES-E,978758,COMPL,NEND,RCV,1-DAY,08-25,00-00,1,,,,"

EQUIP-OME1,15-08-26,01:30:54,ETH-1-13-1,ETH:OUTFRAMES-E,1057147,COMPL,NEND,TRMT,1-DAY,08-25,00-00,1,,,,"

etc...


In reply to Parsing/Splitting data by acondor

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.