use strict;
use warnings;
my $seconds = shift or die "Entre the seconds parameter\n";
my @parts = gmtime($seconds);
printf ("day -%4d\t hours - %4d\tminute - %4d\tseconds - %4d\n",@parts[7,2,1,0]);
$perl secondsTohours.pl 89600
day - 1 hours - 0 minute - 53 seconds - 20
$perl secondsTohours.pl 3600
day - 0 hours - 1 minute - 0 seconds - 0
0 comentários:
Post a Comment