Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Active Perl on Windows XP error message stty??

Posted on 2004-04-02
2
Medium Priority
?
358 Views
Last Modified: 2010-05-18
G'day peoples

I'm new to Perl and i have just set up Active Perl on Windows Xp
I have written a basic program that works on the unix box but when i try to run it on Windows Xp

I get the error message "" stty is not a recognised as an internal or external command, operable program or batch file""

I was wondering if i need to Install a module and if so which one and How??

this was my program Very basic but i just want it to run so i can continue learning..

//PROGRAM

#!/usr/bin/perl             
use Getopt::Std;             
      
                        
getopts('a:h');             

if($opt_a) { print "Adding user $opt_a:$!\n";
           print "Enter password: ";
      system ("stty -echo");
      $input=<STDIN>;      
      chomp $input;
      system ("stty echo");
      print ($input,"\n");
         }
                        
if($opt_h) { print "Hello World\n";}

exit;

Thanks MAte for your time..
Chad
0
Comment
Question by:Chad_MacArthur
2 Comments
 
LVL 85

Accepted Solution

by:
ozo earned 60 total points
ID: 10745987
use Term::ReadPassword;
0
 
LVL 8

Expert Comment

by:davorg
ID: 10746770
stty is a Unix command. It doesn't exist on Windows. You'll need to find an alternative way of turning off the echoing of text. ozo's suggestion looks like a good one.

Dave...
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question