You are correct in that if NetTelnet doesn't see the prompt, it will never issue the command. I had two problems when using that module to telnet from my Solaris system to the Vax,
1) - commands timing out
2) - never getting the prompt

For our vax, the prompt is $ - which I thusly defined as the prompt. However, set your script to make the dump log for Net::Telnet, and look thru the content. I found that somehow my $ sign was eaten in the translation, and had to define it as $match = '/\[0c/'; After that, I've always caught the prompt correctly.

Another problem I had that caused timeouts was the error mode of the module.The default errmode is die if I recall correctly, which kept throwing the monkey wrench in my script. My code to avoid that looked like
$vax = new Net::Telnet(Prompt => $match);<br> $vax->errmode("return");

While these may not exactly fit your problem, and seeing as how I'm answering this several months late, I hope it helps at all in some small matter. I'm just glad to know enough to comment on something now! =)

In reply to Re: Unix - VMS and Net::Telnet by TrinityInfinity
in thread Unix - VMS and Net::Telnet by maderman

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.