Re: Sleep

2013-09-15 Thread John W. Krahn
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 can find the time remaining in the sleep say by sending a signal? Thanks, Not directly. You have to record the time b

comparing all the elements of an array

2013-09-15 Thread Unknown User
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 example, it can be hundreds of numbers. Is there an algorithm

Re: Sleep

2013-09-15 Thread Shawn H Corey
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 can find the time remaining in the sleep > say by sending a signal? > > Thanks, Not directly. You have to record the time before the sleep

Sleep

2013-09-15 Thread Unknown User
If my perl script has a sleep for say 300 seconds, when the sleep is being run is there any way i can find the time remaining in the sleep say by sending a signal? Thanks,

Re: MySQL, Perl, and LaTeX: Trying to loop through results by DAY (as a LaTeX section) for custom PDF report

2013-09-15 Thread J M
Nevermind, I was thinking too hard... this was actually quite trivial. Here's what I added to the code: my $row;my $date = ''; # set the `logbook` variableswhile ($row = $sth->fetchrow_hashref()) {my $id = $row->{id};my $date_added = DateTime::Format::MySQL->parse_timestamp($row->{date_added});m

MySQL, Perl, and LaTeX: Trying to loop through results by DAY (as a LaTeX section) for custom PDF report

2013-09-15 Thread J M
I have written a Perl script (shown below) to loop through my MySQL database and then output a .tex file, as a sort of programmed custom report. As it stands, it works rather