Thanks to Botje on freenode #perl...this is FIXED!!

Apparently inetd is using block buffering....so the fix was simply

$| = 1;

I would have never known about this issue....this cost me hours and hours

Thanks Botje! and hope this helps someone else out

One additional note....that is deprecated and the proper form is

STDOUT->autoflush;

This is a snippet from a longer app.

The app, when run in a shell works 100% as expected.

It asks for input from a user, validates, and submits to an online service to look up the data that was entered and return a listing.

The app is run from inetd and the interface to the app is a telnet session.

This is for a packet radio node, to look up ham call signs, thus the arcane inetd/telnet interface.

When run via telnet and inetd, invalid entries return immediately to the prompt. a 'q' to quit, immediately exits, but with a valid call sign, it just sits and I have to hit <enter> one more time...then it responds completely normally.

Outside this block I have to set TERM=dumb or I get no display at all via telnet. I also have to do term resets as is shown in this snippet, in two other places or I get no display via the telnet session.

In the shell, none of that term mangling is needed

while ($seskey) { print "Callsign? or q: \n"; ( my $call = <STDIN> ); $call =~ s/[^a-zA-Z0-9]*//g; # Should we quit? if ( $call =~ m/^q.*/ ) { exit; } if ( not $call =~ m/^[a-zA-Z].*[0-9][a-zA-Z].*$/) { system(($^O eq 'MSWin32') ? 'cls' : 'clear'); print "invalid call \n"; next; }

In reply to app via inetd and telnet, terminal handling weirdness by kc2rgw

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.