Ask a Question related to PERL Modules, Design and Development.
-
pdc124 #1
Net::telnet and R arrow
Im retrieving information from our telnet server , which it displays a
page at a time . The on -screen prompt is "press L or R arrow for
more"
[url]http://www.cl.cam.ac.uk/~mgk25/ucs/wgl4.txt[/url] says R arrow is 2192
[url]http://perldoc.perl.org/perlreref.html[/url]
do {$text=$t->get;
#print "$text";
$names.=$text;}
until ($text=~m/duplicates/);
(duplicates is the last ASCII that appears on the screen )
and ive tried
$t->put(\x{2192}); (or print(\x{2192})
which gives an error
"Can't call method "x" without a package or object reference"
How can i send a R or L arrow ?
OS=gentoolinux
perl 5.8.6-r6
pdc124 Guest
-
How do you telnet from 1 host to another using Telnet Module
Hello, I need to know how you telnet from one host to another using the net::telnet module. I can telnet to a single host OK but I need to then... -
net::telnet to ms telnet server
i need to connect to a microsoft telnet server via net::telnet (and io::pty). i can connect and communicate successfully via the telnet command in... -
Net::Telnet problem with MS Telnet Service
Hello, After reading the Net::Telnet documentation, examples, searching the 'Net, etc., I still do not completely understand the problem of... -
How to add an Arrow ?
How to add an "arrow" by using the Line Tool ? InDesign CS Windows Thanks Henrik -
Help with left arrow down & right arrow down
Hi all, I am creating a presentation in Director MX, and need to program the right arrow key to advance to next marker, and the left arrow key to... -
Kalle Olavi Niemitalo #2
Re: Net::telnet and R arrow
"pdc124" <pdc124@yahoo.co.uk> writes:
The \x syntax for hexadecimal character codes works only in> $t->put(\x{2192}); (or print(\x{2192})
>
> which gives an error
> "Can't call method "x" without a package or object reference"
quoted strings. So you could have print("\x{2192}").
However, U+2192 is a printable character and not easy to type on
common keyboard layouts. It is therefore likely that your telnet
server is not expecting that character but rather an escape
sequence like "\e[C" or "\e[D". See Standard ECMA-48.
I don't know if you need to negotiate some Telnet options before
sending these.
Kalle Olavi Niemitalo Guest
-
pdc124 #3
Re: Net::telnet and R arrow
thanks ive read all 108 pages of
Standard ECMA-48 (Fifth Edition - June 1991 Reprinted June 1998)
Control Functions for Coded Character Sets from
[url]http://www.ecma-international.org/publications/standards/Ecma-048.htm[/url]
and cant find a reference to right and left arrows .
Am I looking in the wrong place ?
pdc124 Guest
-
pdc124 #4
Re: Net::telnet and R arrow
update :
[url]http://www.linux.cz/lists/archive/linux/82763.html[/url] seems to indicate
that the sequence you posted is what i I should be sending to the
server
$t->put(e\[D);
is
Unquoted string "e" may clash with future reserved word at
/usr/local/bin/telnet.pl line 54.Backslash found where operator
expected at /usr/local/bin/telnet.pl line 54, near "e\"
$t->put("e\[D");
Use of uninitialized value in regexp compilation
$t->put("\e\[D"); (trying to escape it )
Use of uninitialized value in regexp compilation at
/usr/local/bin/telnet.pl line 55.
sorry to be soe dumb .
pdc124 Guest
-
DJ Stunks #5
Re: Net::telnet and R arrow
pdc124 wrote:
1) ITYM "\e[D"> $t->put("e\[D");
2) I suspect this warning is being thrown by some other portion of your> Use of uninitialized value in regexp compilation
code. the line above would not trigger such a warning.
3) to send a "right" I would do the following:
use charnames qw{ :full };
# and later...
$t->put(\N{RIGHTWARDS ARROW});
-jp
DJ Stunks Guest
-
DJ Stunks #6
Re: Net::telnet and R arrow
DJ Stunks wrote:
oops.> pdc124 wrote:>> > $t->put("e\[D");
> 1) ITYM "\e[D"
>>> > Use of uninitialized value in regexp compilation
> 2) I suspect this warning is being thrown by some other portion of your
> code. the line above would not trigger such a warning.
>
> 3) to send a "right" I would do the following:
>
> use charnames qw{ :full };
>
> # and later...
> $t->put(\N{RIGHTWARDS ARROW});
make that: $t->put("\N{RIGHTWARDS ARROW}");
muh bad.
-jp
DJ Stunks Guest
-
pdc124 #7
Re: Net::telnet and R arrow
"I suspect this warning is being thrown by some other portion of your
code. the line above would not trigger such a warning. ". Correct -
sorry to be so hopeless at this.
with this in
$t->put("\N{RIGHTWARDS ARROW}");
i get this error message
Wide character in print at /usr/lib/perl5/5.8.6/i686-linux/IO/Handle.pm
line 399.
Wide character in syswrite at
/usr/lib/perl5/site_perl/5.8.6/Net/Telnet.pm line 3010.
pdc124 Guest
-
DJ Stunks #8
Re: Net::telnet and R arrow
pdc124 wrote:
well, those are only warnings, did it actually work?> "I suspect this warning is being thrown by some other portion of your
> code. the line above would not trigger such a warning. ". Correct -
> sorry to be so hopeless at this.
>
>
> with this in
>
> $t->put("\N{RIGHTWARDS ARROW}");
> i get this error message
>
> Wide character in print at /usr/lib/perl5/5.8.6/i686-linux/IO/Handle.pm
> line 399.
> Wide character in syswrite at
> /usr/lib/perl5/site_perl/5.8.6/Net/Telnet.pm line 3010.
if not, (re-reading this thread -- which I should have done before
posting at all), Kalle may be right and you may be back to trying to
send your "\e[D" virtualkey.
-jp
DJ Stunks Guest
-
Kalle Olavi Niemitalo #9
Re: Net::telnet and R arrow
"pdc124" <pdc124@yahoo.co.uk> writes:
They are in clauses 8.3.20 (CUF - CURSOR RIGHT) and 8.3.18 (CUB -> thanks ive read all 108 pages of
> Standard ECMA-48 (Fifth Edition - June 1991 Reprinted June 1998)
> Control Functions for Coded Character Sets from
> [url]http://www.ecma-international.org/publications/standards/Ecma-048.htm[/url]
>
> and cant find a reference to right and left arrows .
CURSOR LEFT).
ECMA-48 is mostly phrased in terms of what a terminal should do
when it _receives_ control sequences, for example from a Telnet
server. However, terminals can also _send_ these sequences when
the user presses keys. Clauses 8.3.52 (FNK - FUNCTION KEY) and
8.3.68 (INT - INTERRUPT) make this particularly clear.
Kalle Olavi Niemitalo Guest
-
pdc124 #10
Re: Net::telnet and R arrow
doesnt retrieve the next 'page' of information
ie
###SEND r ARROW
$matchtext='duplicates';
#$t->put("\e\[D");
$t->put("\N{RIGHTWARDS ARROW}"); #same for $t->print
do {$text=$t->get;
print "$text";
$names.=$text;}
until ($text=~m/$matchtext/);
produces
Wide character in print at /usr/lib/perl5/5.8.6/i686-linux/IO/Handle.pm
line 399.
Wide character in syswrite at
/usr/lib/perl5/site_perl/5.8.6/Net/Telnet.pm line 3010.
as output
/tmp/inputlog contains the first 'page' of the stuff im trying to
retrieve
so how do I send the virtual key ?
pdc124 Guest
-
Steve van der Burg #11
Re: Net::telnet and R arrow
"pdc124" <pdc124@yahoo.co.uk> wrote in
news:1141201698.979775.83190@u72g2000cwu.googlegro ups.com:
linux/IO/Handle.pm> doesnt retrieve the next 'page' of information
> ie
> ###SEND r ARROW
> $matchtext='duplicates';
> #$t->put("\e\[D");
> $t->put("\N{RIGHTWARDS ARROW}"); #same for $t->print
> do {$text=$t->get;
> print "$text";
> $names.=$text;}
> until ($text=~m/$matchtext/);
>
> produces
> Wide character in print at /usr/lib/perl5/5.8.6/i686-You may be sending the key to the host, but then your end isn't> line 399.
> Wide character in syswrite at
> /usr/lib/perl5/site_perl/5.8.6/Net/Telnet.pm line 3010.
> as output
>
> /tmp/inputlog contains the first 'page' of the stuff im trying to
> retrieve
>
> so how do I send the virtual key ?
responding the same way a terminal would to the application on the host
end after that, so no second page. I found this out when writing an
application that did user emulation. Looking at packet traces of a
real user connected via telnet and using a VT-100 terminal emulator
showed that the terminal side had to respond to some sequences that the
host side was sending.
That led me to use this:
[url]http://search.cpan.org/~ajwood/Term-VT102-0.82/[/url]
in conjunction with Net::Telnet to get the job done.
....Steve
--
Steve van der Burg
Technical Analyst, Information Services
London Health Sciences Centre
London, Ontario, Canada
Email: [email]steve.vanderburg@lhsc.on.ca[/email]
Steve van der Burg Guest



Reply With Quote

