Thread Perl-Anfänge: Umrechnungen (9 answers)
Opened by Gast at 2003-11-05 11:10

ghost
 2003-11-06 17:56
#69219 #69219
User since
2003-11-05
2 Artikel
BenutzerIn
[default_avatar]
hab das ganze jetzt so gelöst....gut ist....*g*

thx for help

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl -w
#
# Syntax: seconds2date [seconds]
#
if ($ARGV[0])   { $wann = $ARGV[0]; }
else            { $wann = <STDIN>;  }
#($sek,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime $wann;
($sek,$min,$hour,$mday,$mon,$year) = gmtime $wann;
$year-= "70";
$mday--;
if ( $hour < "10") { $hour = "0" . $hour; }
if ( $min  < "10") { $min  = "0" . $min;  }
if ( $sek  < "10") { $sek  = "0" . $sek;  }
print "$hour:$min:$sek - $mday Tage $mon Monate $year Jahre\n";


greets

Bearbeitet von Crian: Code-Tags eingefügt\n\n

<!--EDIT|Crian|1068136778-->

View full thread Perl-Anfänge: Umrechnungen