The question has several parts:

  • (1)How to connect to the server? Since you mentions IO::Socket I assume the server is listening on a socket. What protocol is it expecting to service?
  • (2)After you fetch the file you need to extract the data from the file. Usually some combination of split(), grep() and regular expressions are used.
  • (3)Then this data is stored in your $box display object.

    Which of 1, 2, or 3 do you need help with?

    The code posted is unhelpfully adjacent to the question you asked. could you perhaps edit your post to only include an outline of the code? Unless, of course, multiple Perl Monks picking apart your code is what you want?


    s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}

    In reply to Re: Get data from a file and put it in a Tk Entry by starbolin
    in thread Get data from a file and put it in a Tk Entry by padawan_linuxero

    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.