in reply to Converting seconds to DD:HH:MM:SS
If you want compact:
my @fields = ($secs % 60, ($secs /= 60) % 60, ($secs /= 60) % 24, int +($secs / 24)); print join ':', reverse @fields;
However my Perl legalese is not up to assuring you that the calculation will be done in the correct order for all Perl implementations. :)
|
|---|