note
shmem
<p>
At the moment the list of lines is assigned to your <c>@lnes</c> variable (why do you omit the i? iShortage?), the telnet command already has returned. No need to [doc://sleep] here.
</p>
<p>
The problem might be that a) there are no lines returned or b) the lines are empty and/or c) they have no newline character at the end. Try:
</p>
<code>
@lines= $port->cmd("input keyevent 66"); # added i
print "Number of lines returned: ", scalar(@lines), "\n";
print "Console Log:\n"; # added newline character
for( @lines ) {
print ">$_<\n"
}
</code>
<div class="pmsig"><div class="pmsig-510280">
<small>perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'</small>
</div></div>
1064576
1064576