Kamal Ahmed wrote:

> Bill,
> 
> When I use your approach, I am getting an error:
> 
> 25/02/2001-Use of uninitialized value in sprintf at ./exploitD.pl line
> 208.
> 17:14:33.016000 time="" action="" orig="bedm-edn-650-pri"
> i/f_dir="inbound" i/f_
> 
> Line 208 and few lines around it are as below:

>     my $epochseconds = "0";
>     my $microseconds = "0";
>     ($epochseconds, $microseconds) = gettimeofday; 
>       ($second, $minute, $hour) = localtime($epochseconds); 
>       print sprintf("%02d:%02d:%02d.%06d %s",  ## ----- THIS IS Line 208
>                 $hour, $minute, $second, $microseconds);  

Drop the last %s on that line (it was probably for the timezone in
the original code).

use Time::HiRes qw(gettimeofday);

my ($epoch, $usecs) = gettimeofday;
my ($second, $minute, $hour) = localtime $epoch;
print sprintf "%02d:%02d:%02d.%06d\n", $hour, $minute, $second, $usecs;

__END__


-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to