tags:

views:

174

answers:

2

I am using Perl's Net::Telnet module to access an application available over telnet.

I am using $telnet->waitfor() and $telnet->print() methods to determine the form received and submit appropriate data. One of the forms has two options - "Find" and "Cancel".

In a terminal, I can just hit TAB to choose "Cancel" and ENTER. But within the script, sending TAB is not working for me, i.e.:

$telnet->print('\t')

or

$telnet->print("\t")

Does anyone know how to solve this issue?

A: 

Actually $telnet->print("\t") is working.

Quadir
+2  A: 

To send a tab, you need to send the actual bits that represent the tab. The single-quoted version, '\t' won't do that. To turn \t from it's logical form to the right bit representation, you need the double-quote interpolation.

brian d foy