That is what I thought, too.  At some point, during my attempt to get it
all to work correctly, I was seeing it return true for 01 > 32, and I
can't reproduce it now.  Well, whatever, I am now able to comment out
the substitution line and it works fine as you pointed out, Mark


Jim Guion
Sr. Quality Assurance Engineer
[EMAIL PROTECTED]
Bluesocket, Inc.
http://www.bluesocket.com


-----Original Message-----
From: Thomas, Mark - BLS CTR [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 18, 2004 12:21 PM
To: Jim Guion; [EMAIL PROTECTED]
Subject: RE: Check numbers


Jim Guion wrote:
>   #print "\$list[$i]: '$list[$i]'\n"; #NOTE: It's a 'string' here!
>   $list[$i] =~ s/^0//: #Strips the leading zeroes!
>   #print "\$list[$i] now: '$list[$i]'\n"; #NOTE: Number now, good!

Wrong and completely unnecessary. Leading zeros have nothing to do with
whether it's a 'string' or a 'number'. In perl, it doesn't matter--just
operate on it, it'll do the right thing.



-- 
Mark Thomas                    [EMAIL PROTECTED] 
Internet Systems Architect     DigitalNet, Inc. 

$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;;

  


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to