[San-Diego-pm] A few questions of Perl

Christopher Hart christopher.p.hart at gmail.com
Wed Dec 9 18:32:52 PST 2009

thanks for the save on 2 keith. :)
i was off by a mile, and Time::HiRes is a great suggestion for the relative
OS independence.
I would hope, but can't confirm, alex is using something *nixy, though
"a test application running on PC." is somewhat nondescript in that regard.

On Wed, Dec 9, 2009 at 6:21 PM, Keith Thompson <kst at mib.org> wrote:

> On Wed, Dec 09, 2009 at 05:49:10PM -0800, Christopher Hart wrote:
> > 1. I would assume, (possibly incorrectly) that using the Socket or
> > IO::Socket modules would provide the inherent ability to open more than
> one
> > tcp socket for send/receive. Although i could see being limited in having
> > more than one [socket bound to a] filehandle open, there are always a
> > billion ways to do something in perl.
> I lack sufficient expertise to comment on this, but ...
> > 2. I've seen someone do a sleep(undef, undef, undef, 0.2); to wait a
> > quarter-second, but i can't confirm it works.
> It's select(undef, undef, undef, 0.25).  "perldoc -f select" for
> more information (you'll need to scroll past the "select FILEHANDLE"
> version).
> But I'm not sure that that's what Alex is looking for.  He wrote:
>    2. Is there a event scheduler modules I can use to schedule the sending
> of
>    a message say several milisecond in the future.
> which suggests he wants schedule the event to take place in the future,
> and continue doing other stuff until it triggers.
> Time:HiRes::ualarm lets you schedule a SIGALRM signal to be delivered
> after a specified time.
> --
> Keith Thompson (The_Other_Keith) kst at mib.org  <http://www.ghoti.net/~kst<http://www.ghoti.net/%7Ekst>
> >
> Nokia
> "We must do something.  This is something.  Therefore, we must do this."
>    -- Antony Jay and Jonathan Lynn, "Yes Minister"


Chris Hart
Systems Administrator
Extrameasures, LLC.
8910 University Center Lane, Suite 475
San Diego, CA  92122
Office - 858.546.1052 x32
Fax - 858.546.1057
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/san-diego-pm/attachments/20091209/325d1183/attachment.html>

More information about the San-Diego-pm mailing list