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\n";

while ( <PORT> ) {

my ($sec, $min, $hour, $mday, $mon, $year, $wday,
$yday, $isdst) =localtime();

print $_;
print ("$hour:$min:$sec\n");
print LOG ("$_"), ("$hour:$min:$sec\n");

}
<snip>


       
____________________________________________________________________________________
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to