<div dir="ltr"><div class="gmail_extra"><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 class="gmail_quote"><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>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>