You are right! I am going to take care about &quot;chomp&quot;.<br><br>This is the modified code:<br><br><b>while ( &quot;$directory&quot; ne &quot;$end&quot; )<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print &quot;Directory: &quot;;<br>&nbsp; $directory = &lt;STDIN&gt;;<br>
&nbsp; chomp $directory;</b><br><br>Thanks!<br><br><div class="gmail_quote">On Thu, May 15, 2008 at 3:14 PM, Marcelo &lt;<a href="mailto:marcelo.magallon@gmail.com">marcelo.magallon@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Thu, May 15, 2008 at 2:46 PM, GatoLinux &lt;<a href="mailto:gatolinux@gmail.com">gatolinux@gmail.com</a>&gt; wrote:<br>
<br>
<br>
&gt; &nbsp; &nbsp; $directory = &lt;STDIN&gt;;<br>
<br>
&gt; Why do it happens?<br>
<br>
When the user inputs &quot;end!&quot;, $directory will contain &quot;end!\n&quot;,<br>
including the &quot;enter&quot; used by the user to let your program continue<br>
after getting the data from STDIN.<br>
<br>
You can do this after that line:<br>
<br>
chomp $directory;<br>
<font color="#888888"><br>
Marcelo<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Solutions from the root.