Re: How to Auto Generate range of years (year of birth between 18 and 73)

2013-09-16 Thread mimic...@gmail.com
The following works, but is this the way to go? #!/usr/bin/env perl use strict; my ($min_yr, $max_yr); $min_yr =(localtime)[5] + 1900 - 18; $max_yr = (localtime)[5] + 1900 - 73; for (reverse($max_yr .. $min_yr)){ print "\$_\<\/option\>\n"; } Mimi On 16 September 2013 14:36, mimic...@gm

How to Auto Generate range of years (year of birth between 18 and 73)

2013-09-16 Thread mimic...@gmail.com
I have this simple script to automatically print HTML selection option. #!/usr/bin/env perl use strict; for (reverse(1943 .. 1991)){ print "\$_\<\/option\>\n"; } I need to print all the years between 18 and 73 without hard coding the range in the for loop as in the above. I am considerin

Re: Sleep

2013-09-16 Thread Charles DeRykus
> On Sun, Sep 15, 2013 at 6:59 PM, Charles DeRykus > wrote: left: ", $start+$sleep -time() }; > ... Actually, this is wrong because if sleep(3) is interrupted by any signal it will return, so something like this should work, eg my $secs_to_sleep = 60; my $start = time(); my $end = $start + $sec

Re: comparing all the elements of an array

2013-09-16 Thread Nathan Hilterbrand
See below On 09/15/2013 06:48 PM, Unknown User wrote: I have an array of numbers, and i want to find the percentage difference between all the elements. Say my @a = ($a,$b,$c); I need to calculate the percentage difference of element a with b, b with c and c with a. The 3 items above are an ex

Re: Sleep

2013-09-16 Thread Ed Davis
(DOH - Obviously I was using 10 seconds to test!) On 16 Sep 2013, at 00:49, "John W. Krahn" wrote: > Shawn H Corey wrote: >> On Sun, 15 Sep 2013 13:00:36 -0700 >> Unknown User wrote: >> >>> If my perl script has a sleep for say 300 seconds, when the sleep is >>> being run is there any way i ca

Re: Sleep

2013-09-16 Thread Ed Davis
Hi, I might be being a noob but reading the OP, aren't they wanting to call the value arbitrarily? Meaning, e.g. an Ajax call in a web page could send a request to find out the time remaining in the sleep. I guess that the sleep (which will halt the script) needs to be invoked after forking a

Re: can't locate object method via perl package

2013-09-16 Thread Jimi Wills
how does your code look? Dr Jimi C Wills "Gurunath Katagi" wrote in message news:cak6su7_lffefoh-jtpm-es84p_mgmnydp4pwdpp8dek19is...@mail.gmail.com... Hi everyone.. I am running a perl program which uses Math::Vector. But i am getting the following error Can't locate object method "UnitVec