I have created a client/server program.In client side it will first read a file and send the data to the server side.Then server send the response to the client.In the data file there is two line which indicate this message is from this client also when server side send a response it will copy that line from the request and add these two line with the response and send.so that client side reconize that this response is for me otherwise discard the message.
so i need a subroutine to prase the outgoing message and store those two line in two variable and when the incoming message will come then it will retrive those two line and compare with the previous two line.if match then the message is for this client otherwise discard.

My probelm is that i cannot store those two line in two variable.Any hint will help me a lot.

In reply to How to store each line into different variable?? by sam_0056

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.