Perl script help

2006-01-25 Thread Jack Stone
I'm using an old (2001) canned perl script to manage questions to my tech site. It is of big help since it can answer common questions from templates and a real time saver. Alas, that time saves is now being diminished by junk mail about cheap drugs and I'm trying to figure out how to filter

Re: Perl script help

2006-01-25 Thread Jack Stone
From: Greg Barniskis [EMAIL PROTECTED] To: Jack Stone [EMAIL PROTECTED] CC: freebsd-questions@freebsd.org Subject: Re: Perl script help Date: Wed, 25 Jan 2006 13:29:39 -0600 Jack Stone wrote: I'm using an old (2001) canned perl script to manage questions to my tech site. It is of big help since

perl script help

2004-04-16 Thread JJB
I need $timezone to hold the time zone in this format -00:00 The command date +%z will give it as - 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

Re: perl script help

2004-04-16 Thread Remko Lodder
JJB wrote: I need $timezone to hold the time zone in this format -00:00 The command date +%z will give it as - 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

Re: perl script help

2004-04-16 Thread Remko Lodder
Not that i am very good in perl, In KSH scripting it's like this: %H:%M for a 00:00 output instead of Perhaps that will help you:-) (Oh the command date +%H:%M) Cheers Well that does not work (FYI) Cheers (perhaps Matthew's comments on this are better ;-) ) -- Kind regards, Remko

Re: perl script help

2004-04-16 Thread Shaun Friedle
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: #!/usr/bin/perl $timezone=`date +\%z`; #Gets the offset in $timezone

Re: perl script help

2004-04-16 Thread Warren Block
On Fri, 16 Apr 2004, Shaun Friedle wrote: #!/usr/bin/perl $timezone=`date +\%z`;#Gets the offset in $timezone $timezone =~ s/(\+[0-9][0-9])/$1:/; #Replaces ±NN with ±NN: print $timezone; #Prints $timezone The regex should allow either a plus or a minus