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. :)
In reply to Re: Converting seconds to DD:HH:MM:SS
by GrandFather
in thread Converting seconds to DD:HH:MM:SS
by McDarren
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |