First than all I declare that I am beginner Perl programmer (most probably &quot;enthusiast&quot;)... I am facing a problem based upon the following code:<br><br>@list = ();<br>$end = &quot;end!&quot;;<br><br>while ( $directory ne $end ) {<br>
&nbsp;&nbsp;&nbsp; print &quot;Directory: &quot;;<br>&nbsp;&nbsp;&nbsp; $directory = &lt;STDIN&gt;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; push (@list, $directory);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; print @list;<br>&nbsp;&nbsp;&nbsp; } <br><br>Here&#39;s my explanation:<br><br>This code should ask for any number of &quot;Directories&quot; defined by $directory = &lt;STDIN&gt;;<br>
and<br>the program should stop asking for directories when the user input is: end!<br><br>Unfortunately, this last sentence is not being performed. You can check that there&#39;s not &quot;break&quot; as soon as $end is entered by the user. Then, this &quot;while&quot; becomes infinite.<br>
<br>Why do it happens? <br><br>It seems like: $directory ne $end is being ignored.<br><br>Thanks in advance for your assistance!<br><br>