On Fri, 2004-04-16 at 17:05, JJB wrote:
> 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?

Try this:

$timezone=`date +\%z`;                  #Gets the offset in $timezone
$timezone =~ s/(\+[0-9][0-9])/$1:/;     #Replaces ±NN with ±NN:
print $timezone;                        #Prints $timezone

Shaun Friedle

[EMAIL PROTECTED] mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to