<div dir="ltr">Hello, Xavier,<div><br></div><div>Sure, your notes about int() are absolutely correct.</div><div>Seems like I was not attentive enough and have not seen that the input file <span style="font-family:arial,sans-serif;font-size:13px">assumed </span>to be well formed, <span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px;white-space:nowrap">therefore </span>used this function only for checking rows for an integer values.</div>
<div><br></div><div>Best regards, Stanislav</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-17 16:36 GMT+04:00 Xavier Noria <span dir="ltr"><<a href="mailto:fxn@hashref.com" target="_blank">fxn@hashref.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class=""><div class="gmail_quote">On Mon, Mar 17, 2014 at 1:28 PM, Stanislav <span dir="ltr"><<a href="mailto:web.perldev@gmail.com" target="_blank">web.perldev@gmail.com</a>></span> wrote:</div>


</div><div class="gmail_quote"><div class=""><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
Hello, Enric,<div>

<br></div><div><div>In this code int() just checks each row of the input file for an integer value.</div></div></div></blockquote><div><br></div></div><div>It does not!</div><div><br></div><div><div>    fxn@yeager:~/tmp $ perl -le 'print int "0"'</div>


<div>    0</div></div><div><br></div><div><div>    fxn@yeager:~/tmp $ perl -le 'print int "21.34"'</div><div>    21</div></div><div><br></div><div>int() serves a different purpose (the one explained in its docs).</div>


<div><br></div><div>You need no int() call. Firts, the input file is assumed to be formed by numbers. And if you needed to check whether the numbers were well-formed you wouldn't use int().</div><div><br></div><div>Perl ony has scalar values, if you are thinking numbers vs strings you are doing it wrong.</div>


</div></div></div>
<br>_______________________________________________<br>
llista dels Barcelona-pm<br>
<a href="mailto:Barcelona-pm@pm.org">Barcelona-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/barcelona-pm" target="_blank">http://mail.pm.org/mailman/listinfo/barcelona-pm</a><br>
BCN Perl Mongers: <a href="http://barcelona.pm.org" target="_blank">http://barcelona.pm.org</a><br></blockquote></div><br></div>