Brad
2006-01-09 20:03:35 UTC
Hi All!
I don't know a lot of syntax of Perl. But
requesting user input shouldn't be too difficult.
However, this example doesn't work:
print "Enter a number:";
$num="chomp(<STDIN>)";
print "You entered $num\n";
The promptuser();
function doesn't work either.
However, as I was digging through the perl examples
in sys:perl\scripts and found the readpasswd.pl file.
So I can get user input and my script works. However
when a user types the text it shows up as asterisks(****).
Here is the example code:
use passwd;
$prompt = "Enter your password : ";
$passwd = getpasswd($prompt);
print 'Password you have typed is ' . $passwd;
print "\r\n\;
so, this works for what I want. But i'm just curious if
there is a function that I can just type text and not
display asterisks. Or if anyone has a better way for perl
on NetWare to stop and request user input?
The big picture here is I have modified the UserQuotas.pl
perl script. Instead of putting all the variables on the
command line, I will have the perl script stop and
request the info. But it will read the current quota for
that user and display it, then ask what to change the
new quota to. It works now, but when I type in the new
quota it's asterisks.
Thanks
Brad B.
I don't know a lot of syntax of Perl. But
requesting user input shouldn't be too difficult.
However, this example doesn't work:
print "Enter a number:";
$num="chomp(<STDIN>)";
print "You entered $num\n";
The promptuser();
function doesn't work either.
However, as I was digging through the perl examples
in sys:perl\scripts and found the readpasswd.pl file.
So I can get user input and my script works. However
when a user types the text it shows up as asterisks(****).
Here is the example code:
use passwd;
$prompt = "Enter your password : ";
$passwd = getpasswd($prompt);
print 'Password you have typed is ' . $passwd;
print "\r\n\;
so, this works for what I want. But i'm just curious if
there is a function that I can just type text and not
display asterisks. Or if anyone has a better way for perl
on NetWare to stop and request user input?
The big picture here is I have modified the UserQuotas.pl
perl script. Instead of putting all the variables on the
command line, I will have the perl script stop and
request the info. But it will read the current quota for
that user and display it, then ask what to change the
new quota to. It works now, but when I type in the new
quota it's asterisks.
Thanks
Brad B.