Will this work?  Should probably try it.

$seconds = $ARGV[0];

($hours, $mins, $secs) = &HMS($seconds);
print "$hours, $mins, $secs";

sub HMS
{
  my $tsecs = $_[0];
  my $secs = $tsecs % 60; ($tsecs -= $tsecs % 60) /= 60;
  my $mins = $tsecs % 60; ($tsecs -= $tsecs % 60) /= 60;
  my $hours = $tsecs;

  return ($hours, $mins, $secs);
}

    - Justin Rogers, CEO DigiTec Web Consultants
    [COOP]DigiTec - Half-Life, Q3A, Unreal Tournament

----- Original Message ----- 
From: "stanley g martin" <[EMAIL PROTECTED]>
To: "Perl-Win32-Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, May 04, 2000 11:00 AM
Subject: Seconds to Formatted Time


> I hate to attempt to recreate the wheel, but has anyone written a sub
> that will convert a given number of seconds to hours, minutes, seconds?
> 
> Stanley G. Martin
> Midwest Consulting Group
> Sprint Finance Reengineering
> (816) 889-8156
> [EMAIL PROTECTED]
> 
> 
> 


---
You are currently subscribed to perl-win32-users as: [[email protected]]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to