You are right! I am going to take care about "chomp".<br><br>This is the modified code:<br><br><b>while ( "$directory" ne "$end" )<br>{<br> print "Directory: ";<br> $directory = <STDIN>;<br>
chomp $directory;</b><br><br>Thanks!<br><br><div class="gmail_quote">On Thu, May 15, 2008 at 3:14 PM, Marcelo <<a href="mailto:marcelo.magallon@gmail.com">marcelo.magallon@gmail.com</a>> 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 <<a href="mailto:gatolinux@gmail.com">gatolinux@gmail.com</a>> wrote:<br>
<br>
<br>
> $directory = <STDIN>;<br>
<br>
> Why do it happens?<br>
<br>
When the user inputs "end!", $directory will contain "end!\n",<br>
including the "enter" 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.