From owner-freebsd-questions@FreeBSD.ORG Fri Apr 16 09:05:25 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29E1E16A4CE for ; Fri, 16 Apr 2004 09:05:25 -0700 (PDT) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id C636B43D54 for ; Fri, 16 Apr 2004 09:05:24 -0700 (PDT) (envelope-from Barbish3@adelphia.net) Received: from barbish ([67.20.101.71]) by mta11.adelphia.net (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with SMTP id <20040416160524.KAXU21898.mta11.adelphia.net@barbish> for ; Fri, 16 Apr 2004 12:05:24 -0400 From: "JJB" To: "freebsd-questions@FreeBSD. ORG" Date: Fri, 16 Apr 2004 12:05:24 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal Subject: perl script help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Barbish3@adelphia.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2004 16:05:25 -0000 I need $timezone to hold the time zone in this format -00:00 The command date +%z will give it as -0000 I know nothing about writing perl scripts. Can somebody show me how to add the : in the output of the date command in the simple following script? The cat statement is just so I can see results are correct. #!/usr/bin/perl $timezone=date +%z; cat $timezone