Re: Monat ohne fuehrende Null

Michael Wenger <[email protected]>
Newsgroups gmane.linux.suse.programming
Message-ID <[email protected]>
Hi nochmals!

Vergiss meinen letzten Vorschlag. Der war sehr suboptimal ;-)

Dieses hier sollte funktionieren:
(my $formatted_date = strftime("%d:%m:%Y", localtime)) =~ 
s/[0]?(\d+):[0]?(\d+):(.*)/$1.".".$2.".".$3/e;
print $formatted_date;

Bei mir hat dieser Schnipsel funktioniert.
Ich habe %d statt %e verwendet, da %e anscheinend mit ActivePerl unter 
Windows nicht funktioniert.

Gruß,
Michael

-- 
Um die Liste abzubestellen, schicken Sie eine Mail an:
    [email protected]
Um eine Liste aller verfügbaren Kommandos zu bekommen, schicken
Sie eine Mail an: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.