I made the script below to have this line tumbling like  cartwheel and i want it to run for 30 seconds. Im receiving the error, "The Unsupported function alarm function is unimplemented at C:\PERL\TRAINING\PERL\timedroutine.pl line 11" for the script below. Need help in knowing what i did wrong.  Thanks!

##!/usr/intel/bin/perl -w
use strict;
use warnings;

my $time_to_die=0;
my $timeout=30; #in seconds
my @e=qw(| \ - /);
$SIG{ALRM} = sub { $time_to_die=1; };

alarm($timeout);
while(!$time_to_die)   

{
while (1)
    { foreach (@e)
        {
        print $_."\b";
        }
    }      
}

cheerio,
nix juban
Northwood-V Product Development Engineer
PG12 Tel. # 8-859-2354 (INET)
"While I don't claim to be a great programmer, I try to imitate one. An important trait of the great ones is constructive laziness. They know that you get an A not for effort but for results [...]" -- Eric S. Raymond, "The Cathedral and the Bazaar"

 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to