Re: Time stamp not updating

2007-07-15 Thread Craig McKenzie
On 7/13/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: CM Analyst wrote: > Hi, > In the following script, I am inserting a time stamp. > The problem is that the time stamp ($sec) is not > incrementing. > > What am I doing wrong? > > > open (PORT, "+>COM1") || die "Can't Open Port\n"; > open

Re: Solved: Re: Time stamp not updating

2007-07-13 Thread Dr.Ruud
CM Analyst schreef: > my ($sec, $min, $hour, > $mday, $mon, $year, > $wday, $yday, $isdst) = localtime(); You don't have to allocate variables for the values that you don't need, so in your case this might be sufficient: my ($sec, $min, $hour) = localtime; If you need

Solved: Re: Time stamp not updating

2007-07-13 Thread CM Analyst
Dear All, The following works for me. # use strict; use warnings; use Win32::SerialPort; use IO::Select; use IO::File; use IO::Handle; use Time::Local; # Serial Settings open (PORT, "+>COM1") || die "Can't Open Port\n"; open (LOG, "> c:\\temp\\logdata.txt") || die "Can't Open File

Re: Time stamp not updating

2007-07-13 Thread Mr. Shawn H. Corey
CM Analyst wrote: Hi, In the following script, I am inserting a time stamp. The problem is that the time stamp ($sec) is not incrementing. What am I doing wrong? open (PORT, "+>COM1") || die "Can't Open Port\n"; open (LOG, "> c:\\temp\\logdata.txt") || die "Can't Open File\n"; while ( ) { #p

Re: Time stamp not updating

2007-07-13 Thread Chas Owens
On 7/13/07, CM Analyst <[EMAIL PROTECTED]> wrote: snip What am I doing wrong? snip As far as I can see from the code you posted $hour, $min, and $sec shouldn't even have values. Scalars don't magically change value (unless they are tied, but that is magic), so you must put something inside the

Time stamp not updating

2007-07-13 Thread CM Analyst
Hi, In the following script, I am inserting a time stamp. The problem is that the time stamp ($sec) is not incrementing. What am I doing wrong? open (PORT, "+>COM1") || die "Can't Open Port\n"; open (LOG, "> c:\\temp\\logdata.txt") || die "Can't Open File\n"; while ( ) { #print $_; #sleep 1; #