Re: CORE::GLOBAL override question

2003-12-23 Thread David Zhuo
Jesper, next time when you reply, please remember to reply or CC: the group On Tuesday 23 December 2003 12:17, Jesper Noehr wrote: > Hey David. > > Thanks for your reply. > > It seems you're overriding the sub within a package. Is that necesarry? no. it isn't. i put it in the package just for dem

Re: How to check ASCII chars in perl ?

2003-03-07 Thread David Zhuo
On Friday 07 March 2003 13:26, Madhu Reddy wrote: > Hi, > I want to check for some ASCII chars in perl like > following "C" code.. > > How to do this in Perl ? > follwing will work in perl ? > > for($i=0;$i < length;$i++) { > if (($_[$i] < 32) || (($_[$i] > 126)) { > print "Char is non printable

Re: local() on elements of lexical aggregates??? [OT]

2003-02-19 Thread David Zhuo
On Wednesday 19 February 2003 08:16, Paul wrote: > > Er? Sorry, I don't mean for this to sound as bad as it does, but > have you read the docs that *come* with Perl i will let you take a guess. > > Perhaps a mistaken assumption. Could someone delineate the difference > between package va

Re: Big hash question.

2002-11-20 Thread David Zhuo
Mark, A couple things: 1. if you have something like 099, Perl thinks that you mean the Octal value of 99. The leading 0 makes Perl think you mean Octal instead of digit. For example: my $i = 99; #-- means the value 99 my $j = 099; #-- means the value 99 in Octal Now, since the Octal number sy

Re: Regexp

2002-08-26 Thread David Zhuo
thanks for providing the stat. it's very nice. unfortunately, i use vi exclusively and don't like to touch Emacs at all :-) david On Mon, 2002-08-26 at 14:18, Robin Norwood wrote: > david <[EMAIL PROTECTED]> writes: > > > Robin Norwood wrote: > > > From david's headers: > > > > > > User-Agent

Re: Regexp

2002-08-26 Thread David Zhuo
yeah, i know. :-) as soon as i have time... david > >From david's headers: > > User-Agent: KNode/0.7.1 > > Time to change news readers, I think... :-) > > -RN > > -- > > Robin Norwood > Red Hat, Inc. > > "The Sage does nothing, yet nothing remains undone." > -Lao Tzu, Te Tao Ching -- T

Re: Help!! Retrieving Image File

2002-08-21 Thread David Zhuo
where do you get the impression that \n\n is for text file and \r\n\r\n is for binary data??? did you get that somewhere? \r\n\r\n is OS specific but \n\n is portable. does Win32 and UNIX-ish use the same crlf? your best beat is to use \n\n where Perl will translate(transparently in the background

Re: Time and Date

2002-08-20 Thread david zhuo
You should be aware that your have multiple gmtime() function calls in your script and this could cause problem. the reason is because between your first and second gmtime() function call, some times have passed(yes, very very very little but...) so the time return by the 2 gmtime() functions

Re: Time and Date

2002-08-20 Thread David Zhuo
$hour = 1; $hour = sprintf("%02d",$hour); // $hour now become "01" $hour = 10; $hour = sprintf("%02d",$hour); // $hour still "10" no need for the checking it's length. david "A Taylor" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > Thanks for your

Re: time and date

2002-08-20 Thread David Zhuo
do you want to extract the date and time string in your email message(header) or that you want to know what time does the email arrive? david "A Taylor" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am trying to get the time and date that some one sends me