On Wed, Apr 1, 2009 at 20:28, wrote:
> Away from PC so I cannot hookup
> Is alarm perls internal function?
snip
The alarm function is part of Core Perl.
--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
--
To unsubscribe, e-mail: beginners-unsu
Away from PC so I cannot hookup
Is alarm perls internal function?
-Original Message-
From: "Chas. Owens"
Date: Wed, 1 Apr 2009 10:18:51
To: Kelly Jones
Cc:
Subject: Re: Calling subroutine every second using alarm fails
On Wed, Apr 1, 2009 at 08:48, Kelly Jones wrote:
On Wed, Apr 1, 2009 at 08:48, Kelly Jones wrote:
> I want a script that constantly accepts user input, but runs a
> subroutine every second to do other work. My attempt:
>
> $|=1; $SIG{'ALRM'}= "\&alarm_sub"; &alarm_sub;
> while (<>) {print "You typed: $_\n";}
> sub alarm_sub {print "ALARM!\n"; al
>> Original Message
>> Subject: Calling subroutine every second using alarm fails
>> From: Kelly Jones
>> Date: Wed, April 01, 2009 5:48 am
>> To: beginners@perl.org
>>
>>
>> I want a script that constantly accepts user input, b
> Original Message
> Subject: Calling subroutine every second using alarm fails
> From: Kelly Jones
> Date: Wed, April 01, 2009 5:48 am
> To: beginners@perl.org
>
>
> I want a script that constantly accepts user input, but runs a
> subroutine ev
I want a script that constantly accepts user input, but runs a
subroutine every second to do other work. My attempt:
$|=1; $SIG{'ALRM'}= "\&alarm_sub"; &alarm_sub;
while (<>) {print "You typed: $_\n";}
sub alarm_sub {print "ALARM!\n"; alarm 1; return;}
fails miserably. What's the right way to do