perlquestion
emcek
Hi,
<p>Of course I need write some Telnet code in perl but i have some problems. My system support diffrent types of prompt with different functionality, so:</p>
<p>1. login prompt:
<code>This computer resource is private property. Unauthorized access,
misuse, and misappropriation of resources is prohibited by law.
hapWibbSc2 login: root
Password:
Last login: Tue Jun 11 12:04:37 on ttyS0
root@hapWibbSc2:~# </code></p>
<p>2. 'linux' kind prompt
<code>root@hapWibbSc2:~# </code></p>
<p>3. agent prompt:
<code>root@hapWibbSc2:~# cli
Starting Agent CLI
hapWibbSc2# </code></p>
<p>How to detect in which prompt am I, because there is different types of command in every.</p>
<p>And second problem when I grabbing out put of command sometime if output is longer it print "--More--" waiting for <space> key from user to print rest how to decect is and send <space> and grab rest of output.</p>
<p>i.e.
<code>...pciConflictResolutionMode preview sendSortedEutraNeighbors true sendSortedCdma2000Neighbors
true TinterFreqAnrMeasDuration 100 TreportStrongestCellsForSonEhrpd 100 TreportStrongestCellsForSonOnex 100 sonAppLogEn
able true anrModeEUtran disabled anrModeEhrpd disabled anrModeOnex disabled nrtMaxSizeEUtran 134 nrtMaxSizeEhrpd 134 nrt
MaxSizeOnex 134 anrScoreOnexMin 5 anrScoreOnexMax 10 anrSco
--More--
reOnexThresholdMax 20</code></p>
<p>Anyhelp will be grate!</p>