<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I get the same results for both comparisons with 0E0.<br>
<br>
However, I do get different results for the following:<br>
Any punctuation or symbol lower than zero in ASCII table (also gets a
warning if warnings are on)<br>
-0 - as indicated previously<br>
+anynumber - valid as a number, but as a string it starts with a symbol<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a> wrote:
<blockquote
cite="mid:61dd97c0810100815nde2c71ft1b53b5db0107dcc9@mail.gmail.com"
type="cite">
<div dir="ltr">OH, 0E0, I spit at thee ...<br>
<br>
--matt<br>
<br>
<div class="gmail_quote">On Fri, Oct 10, 2008 at 8:12 AM, <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Or
the ever popular true-but-zero value: 0E0<br>
<br>
--Jason<br>
<div>
<div class="Wj3C7c"><br>
On Fri, Oct 10, 2008 at 11:00 AM, <<a moz-do-not-send="true"
href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a>>
wrote:<br>
> use Test::More tests=>2;<br>
><br>
> my $str = "-0";<br>
> ok($str>=0);<br>
> ok($str ge 0);<br>
><br>
><br>
> --matt<br>
><br>
> On Fri, Oct 10, 2008 at 7:52 AM, <<a moz-do-not-send="true"
href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a>>
wrote:<br>
>><br>
>> Here's something that tripped me up that I thought I'd share
as a Perl<br>
>> Puzzle...<br>
>><br>
>> Q1: For what value(s) of $a do the following comparisons
return different<br>
>> results?<br>
>><br>
>> $a >= 0<br>
>> $a ge 0<br>
>><br>
>> Q2: Ok, it isn't hard to guess. But, why? The answer reveals
something<br>
>> unique about Perl that is very important to keep in mind.<br>
>><br>
>><br>
>> Feel free to reply to the list. I'll post the answer later
today if no one<br>
>> nails it.<br>
>><br>
>> -Ed<br>
>><br>
>> _______________________________________________<br>
>> grand-rapids-pm-list mailing list<br>
>> <a moz-do-not-send="true"
href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a><br>
>> <a moz-do-not-send="true"
href="http://mail.pm.org/mailman/listinfo/grand-rapids-pm-list"
target="_blank">http://mail.pm.org/mailman/listinfo/grand-rapids-pm-list</a><br>
><br>
><br>
><br>
> --<br>
> Matthew Heusser,<br>
> Blog: <a moz-do-not-send="true" href="http://xndev.blogspot.com"
target="_blank">http://xndev.blogspot.com</a><br>
><br>
> General, you are listening to a machine. Do the world a favor and
don't act<br>
> like one. -- Dr. Stephen Falken, "War Games", The Movie<br>
><br>
> _______________________________________________<br>
> grand-rapids-pm-list mailing list<br>
> <a moz-do-not-send="true"
href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a><br>
> <a moz-do-not-send="true"
href="http://mail.pm.org/mailman/listinfo/grand-rapids-pm-list"
target="_blank">http://mail.pm.org/mailman/listinfo/grand-rapids-pm-list</a><br>
><br>
_______________________________________________<br>
grand-rapids-pm-list mailing list<br>
<a moz-do-not-send="true" href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a><br>
<a moz-do-not-send="true"
href="http://mail.pm.org/mailman/listinfo/grand-rapids-pm-list"
target="_blank">http://mail.pm.org/mailman/listinfo/grand-rapids-pm-list</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Matthew Heusser,<br>
Blog: <a moz-do-not-send="true" href="http://xndev.blogspot.com">http://xndev.blogspot.com</a><br>
<br>
General, you are listening to a machine. Do the world a favor and
don't act like one. -- Dr. Stephen Falken, "War Games", The Movie<br>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
grand-rapids-pm-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a>
<a class="moz-txt-link-freetext" href="http://mail.pm.org/mailman/listinfo/grand-rapids-pm-list">http://mail.pm.org/mailman/listinfo/grand-rapids-pm-list</a></pre>
</blockquote>
<br>
</body>
</html>