Marto, thanks for the pointer... I suppose I should hang my head in shame that it was in the FAQ... but here's a little summary of what I found...

So the FAQ says that if you don't use Term::ReadKey you're stuck with ioctl (which all the documentation I've read thusfar seems to indicate I should avoid it like the plague... that it's nonportable, really cryptic, and difficult to use... made me dizzy...) nor does the FAQ really answer how in the world one uses ioctl() to do what i was asking (nor does the documentation on the command itself... it also mentions POSIX, but again, that's the whole POSIX system that it references, and my use case might've been in there somewhere... but sadly I lost the will to keep looking.

Luckily the Camel book mentions I can make a system call to stty -erase if I'm lucky enough to have that function supported by my OS (which I am! Yay! so I'll be using that...)

here's what worked for me...

print "Enter password: "; system "stty -echo"; my $passwd = <STDIN>; chomp $passwd; system "stty echo"; print "Fool! I'm telling everyone your password is: $passwd\n";

Of course that requires those system commands to function as they do on your system... as they do on mine.

Anyhow thanks for the help, --Ray

ps if anyone has done an ioctl implementation, I'd love to see what it looks like... cuz the examples in that section were pretty gnarly.


In reply to Re^2: Password Entry using Core modules only? by raybies
in thread Password Entry using Core modules only? by raybies

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.