9 Einträge, 1 Seite |
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = localtime(time);
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
use warnings;
use strict;
# 0 1 2 3 4 5 6 7 8
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
print "$hour:$min\n";
1;
1
2
3
4
5
6
7
8
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
my ($min, $hour) = (localtime(time))[1,2];
printf "%s:%02s", $hour, $min;
1
2
3
4
5
6
7
8
#!/usr/bin/perl
use strict;
use warnings;
my (@time_array) = (localtime(time))[2,1];
print join(":", @time_array);
9 Einträge, 1 Seite |