Telnet.pm question regarding buffer size

S

Scott Clay

#!/usr/bin/perl

use Net::Telnet();
use Net::FTP;

$telnetObj->cmd("ll 12345678901234567890123456789012345678"); //works

## The above command works fine passing it to a second linux box (41 chars
all together) . However, the command below (42 chars) errors out. I think it
has to do with ## the strings length. Is there anyway to increase the buffer
size that I need to pass the string?

$telnetObj->cmd("ll 123456789012345678901234567890123456789"); //DOESN'T
Work


Input.txt File From the Telnet Object (Longer Command I'm trying to pass on
the 2nd machine):
[cliuser3@pcaccli1 cliuser3]$ mkdir /tmp/public/20040518163708
[cliuser3@pcaccli1 cliuser3]$ chmod 755 /tmp/public/20040518163708
[cliuser3@pcaccli1 cliuser3]$ cd /tmp/public/20040518163708
[cliuser3@pcaccli1 20040518163708]$ ll
12345678901234567890123456789012345678^M<163708]$ ll
123456789012345678901234567890123456789
^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H



Perl Version
[ranclay@tatu swift]$ perl -v

This is perl, v5.8.0 built for i386-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2002, Larry Wall


Linux Kernel
[ranclay@tatu swift]$ uname -a
Linux tatu 2.4.20-20.9smp #1 SMP Mon Aug 18 11:32:15 EDT 2003 i686 i686 i386
GNU/Linux
 
A

Anno Siegel

Scott Clay said:
#!/usr/bin/perl

use Net::Telnet();
use Net::FTP;

$telnetObj->cmd("ll 12345678901234567890123456789012345678"); //works

## The above command works fine passing it to a second linux box (41 chars
all together) . However, the command below (42 chars) errors out. I think it
has to do with ## the strings length. Is there anyway to increase the buffer
size that I need to pass the string?

$telnetObj->cmd("ll 123456789012345678901234567890123456789"); //DOESN'T
Work

So what does it do? Show the error message!
Input.txt File From the Telnet Object (Longer Command I'm trying to pass on
the 2nd machine):
[cliuser3@pcaccli1 cliuser3]$ mkdir /tmp/public/20040518163708
[cliuser3@pcaccli1 cliuser3]$ chmod 755 /tmp/public/20040518163708
[cliuser3@pcaccli1 cliuser3]$ cd /tmp/public/20040518163708
[cliuser3@pcaccli1 20040518163708]$ ll
12345678901234567890123456789012345678^M<163708]$ ll
123456789012345678901234567890123456789
^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H

That looks pretty chaotic, at least after Usenet has had its way with it.

In any case, a buffer of 40 bytes size is pretty unlikely. The problem
is probably something else.

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,154
Messages
2,570,870
Members
47,400
Latest member
FloridaFvt

Latest Threads

Top