The problem here is that, since I have to assume that each file/list is infinite, I can never get the total number of matching lines in Process 1 and 2. In a way, this is why the files are alphabetized, because at the point I get a match in 1 and 2, I have to be able to tell (from a finite range of names) if 3 has any kind of match. Alphabetically I can look at the list and say, "well with the match I have in 2, if I get to a point in list 3 that is alphabetically after my match, then I can definitively say that the 3 list has no match"

quick question - will the following work:

my $socket = IO::Socket::INET->new( LocalPort => $PORT, Proto => 'tcp', Listen => 2) or die "Can't create socket on port $PORT to Second($!)\n"; while (<FILE>) { print $socket $_; if(my $second = $socket->accept()) { #if someone sends me something, do something with it #then go back to sending the rest of the file } }
Can I do this?

In reply to Re^4: sockets and such in Perl by scotchfx
in thread sockets and such in Perl by scotchfx

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.