From owner-freebsd-chat Wed Mar 13 2:41:48 2002 Delivered-To: freebsd-chat@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 2A9EF37B405 for ; Wed, 13 Mar 2002 02:41:41 -0800 (PST) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 38A965346; Wed, 13 Mar 2002 11:41:39 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Giorgos Keramidas Cc: Nathan Mace , freebsd-chat@freebsd.org Subject: Re: backups of log files References: <200203130057.TAA27975@uce55.uchaswv.edu> <20020313074829.GC375@hades.hell.gr> From: Dag-Erling Smorgrav Date: 13 Mar 2002 11:41:38 +0100 In-Reply-To: <20020313074829.GC375@hades.hell.gr> Message-ID: Lines: 19 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Giorgos Keramidas writes: > use POSIX; > $s = strftime("%d.%m.%Y", localtime()); > print "$s\n"; Umm, please, use %Y-%m-%d - it'll sort in the right order. And you can just do: print strftime("%Y-%m-%d\n", localtime()); or my $logfn = strftime("log.%Y-%m-%d", localtime()); or whatever, no need for an intermediate variable. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message