<!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">&lt;<a moz-do-not-send="true"
 href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a>&gt;</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, &nbsp;&lt;<a moz-do-not-send="true"
 href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a>&gt;
wrote:<br>
&gt; use Test::More tests=&gt;2;<br>
&gt;<br>
&gt; my $str = "-0";<br>
&gt; ok($str&gt;=0);<br>
&gt; ok($str ge 0);<br>
&gt;<br>
&gt;<br>
&gt; --matt<br>
&gt;<br>
&gt; On Fri, Oct 10, 2008 at 7:52 AM, &lt;<a moz-do-not-send="true"
 href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a>&gt;
wrote:<br>
&gt;&gt;<br>
&gt;&gt; Here's something that tripped me up that I thought I'd share
as a Perl<br>
&gt;&gt; Puzzle...<br>
&gt;&gt;<br>
&gt;&gt; Q1: For what value(s) of $a do the following comparisons
return different<br>
&gt;&gt; results?<br>
&gt;&gt;<br>
&gt;&gt; $a &gt;= 0<br>
&gt;&gt; $a ge 0<br>
&gt;&gt;<br>
&gt;&gt; Q2: Ok, it isn't hard to guess. But, why? The answer reveals
something<br>
&gt;&gt; unique about Perl that is very important to keep in mind.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Feel free to reply to the list. I'll post the answer later
today if no one<br>
&gt;&gt; nails it.<br>
&gt;&gt;<br>
&gt;&gt; -Ed<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; grand-rapids-pm-list mailing list<br>
&gt;&gt; <a moz-do-not-send="true"
 href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a><br>
&gt;&gt; <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>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Matthew Heusser,<br>
&gt; Blog: <a moz-do-not-send="true" href="http://xndev.blogspot.com"
 target="_blank">http://xndev.blogspot.com</a><br>
&gt;<br>
&gt; General, you are listening to a machine. &nbsp;Do the world a favor and
don't act<br>
&gt; like one. -- Dr. Stephen Falken, "War Games", The Movie<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; grand-rapids-pm-list mailing list<br>
&gt; <a moz-do-not-send="true"
 href="mailto:grand-rapids-pm-list@pm.org">grand-rapids-pm-list@pm.org</a><br>
&gt; <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>
&gt;<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. &nbsp;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>