<div dir="ltr">Mentally, I wrote '00' not 00, but clearly I was in the rant, not checking syntax.<br><br>:kicks self:<br><div><br></div><div>The question is, what's the point of using sprintf when you can just write the string you want? I'm 90% sure it's cargo cult.</div><div><br></div><div>You can install Reply to get a repl, but perl -de 0 is cool as well.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 3, 2020 at 10:11 AM Mark Senn <<a href="mailto:mark@purdue.edu">mark@purdue.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> $variable = 00;<br>
<br>
00 evaluates to 0, I'd use<br>
$variable = '00';<br>
<br>
011 evaluates to 9---leading  0 means octal<br>
<br>
I like to use perl -de 0 to explore stuff like this, e.g.,<br>
$ perl -de 0<br>
Loading DB routines from <a href="http://perl5db.pl" rel="noreferrer" target="_blank">perl5db.pl</a> version 1.53<br>
Editor support available.<br>
Enter h or 'h h' for help, or 'man perldebug' for more help.<br>
main::(-e:1):   0<br>
  DB<1> $variable = sprintf("%02d", 0);<br>
  DB<2> print $variable<br>
00<br>
  DB<3> $variable = 00;<br>
  DB<4> print $variable<br>
0<br>
<br>
-mark<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Dave Jacoby<br>
<a href="mailto:jacoby.david@gmail.com" target="_blank">jacoby.david@gmail.com</a><br>
<br>I deal with my software the way I treat my eldritch abomination: <br> It's not human, it's not even alive in the natural sense. </div><div dir="ltr"> It's nightmare-born and nightmare-shaped, and nightmares don't die easy.<br>  -- @yenzie</div></div></div></div>