I was drawn to this post because of where you are trying to retrieve data from and because I too have had problems with Net::Telnet scripts not working as expected... After much trial and error, I have arrived at a solution... not the best solution but it works. Most of your code is still there.

#!/usr/local/bin/perl use strict; use warnings; #use Env qw(TERM); #$ENV{TERM} = 'no-resize-vt100'; # doesn't work even if it is defined +... at least on win2k with ActiveState Perl use Net::Telnet; my $connection = new Net::Telnet ( Host =>' ssd.jpl.nasa.gov', Port => 6775, Dump_Log => './telnet.log', Input_log => './telnet.txt', timeout => 10, ); $connection->open(); $connection->print(''); # couldn't get the tty command to work either +but this forces it to continue $connection->waitfor('/Press return to continue -->/'); # Is it waitin +g for user input? $connection->print(''); # what are you waiting for? press return! $connection->waitfor('/Horizons>\s+$/'); $connection->print('load vla-1'); $connection->waitfor('/Horizons>\s+$/'); $connection->print('page'); $connection->waitfor('/Horizons>\s+$/'); $connection->print('799'); $connection->waitfor('/.*Select.*: $/'); $connection->print('e'); $connection->waitfor('/.*Observe.*: $/'); $connection->print('o'); $connection->waitfor('/.*Coordinate.*: $/'); $connection->print('500@399'); $connection->waitfor('/.*Starting.*: $/'); $connection->print('1981-Mar-07 08:00'); $connection->waitfor('/.*Ending.*: $/'); $connection->print('1981-Mar-07 17:00'); $connection->waitfor('/.*interval.*: $/'); $connection->print('10m'); $connection->waitfor('/.*Accept.*: $/'); $connection->print('y'); $connection->waitfor('/.*Select.*: $/'); $connection->print('y'); $connection->print('q'); $connection->close; exit 0;

Who says that programmers can't work in the Marketing Department?
Or is that who says that Marketing people can't program?

In reply to Re: $ENV{TERM} and Net::Telnet by Mr. Muskrat
in thread $ENV{TERM} and Net::Telnet by bbutler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.