But I;ve already got a sleep 5 in there. See?
use IO::Socket::INET;
#use Time::HiRes qw( time alarm sleep );
do
{
my $MySocket=new IO::Socket::INET->new(Proto=>"udp",
PeerPort=>43278,
PeerAddr=>'10.151.24.174'
) or die "Can't make UDP socket: $@";
$msg="PyHB";
print "Sending Heartbeat.";
$MySocket->send($msg);
sleep (5);
}
while (1==1);
-Dave
"Chris Devers" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, 12 Jan 2005, John W. Krahn wrote:
>
> > GMane Python wrote:
> >
> > > I'm absolutely new to PERL -- actually, I'm using it for exactly 1
> > > project I'm mostly through. On Netware's v5.8 of PERL, I have
> > > basically a loop, a while 1==1 { <stuff> }. On Netware, I can't
> > > break out of this with CTRL-C. CTRL-D, etc. I'd like to put a check
> > > inside the loop to see if 'break' key was pressed. Can someone
> > > please tell me how to do this?
> >
> > Novell has a news group at:
> > news://developer-forums.novell.com/novell.devsup.perl that may be able
> > to answer your question. (I haven't used Netware in a looong time.)
>
> Maybe it's looping too fast for the ctrl+C to get through. Does it work
> better if you change it to something like this?
>
> while (1 == 1) { stuff(); sleep 1 }
>
> That should at least give you a window of opportunity...
>
>
>
> --
> Chris Devers
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>