Happy Thanksgiving Monks!

I want to have to receive loops for two differant simaltanious socket connections, that can send data back to each other. But the problem I'm having is that when the script gets into one loop and dosn't get into the other. I know this is a simple problem, and that I should fork it, or use threads or something like that, but I've been coding perl for couple months now, and I havn't messed with forking/threads and stuff (the loops have to be able to pass socket/file handles between each other too).

To give you an example of what I'm talking about, I'm writing a script that will run as an IRC/AIM bots that allow me to send irc messages through the aim bot portion, and aim messages through the irc bot portion (so I don't allways have to use an irc client or aim client). And when the irc bot gets "PRIVMSG" packets, it will use the AIM connection to send that "PRIVMSG" data to someone on aim. Does this make anysense?

Well any response will be greatly appriciated!

Thank you, and have a great thanksgiving :)

^jasper

In reply to Passing data between two receive loops by Jaspersan

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.