in reply to How do I convert seconds into a readable time?

I love IOs answer but in the spirit of TIMTOWDI here is how to roll your own. This illustrates one of the uses for the modulus operator:

my $sec = 196364; print "days ", int($sec/(24*60*60)), "\n"; print "hours ", ($sec/(60*60))%24, "\n"; print "mins ", ($sec/60)%60, "\n"; print "secs ", $sec%60, "\n";