【发布时间】:2011-05-01 06:33:57
【问题描述】:
perl script.pl --f1="t1" --f2="t2" --f3="t4" --f4 < /home/joe/a.txt
脚本.pl
use Getopt::Long;
my ($f1, $f2, $f3, $f4) ;
GetOptions (
'f1=s' => \$f1,
'f2=s' => \$f2,
'f3=s' => \$f3,
'f4' => \$f4, );
if ($f1) {
system('stty -echo');
print "Password:";
$pwd = <STDIN>;
system('stty echo');
}
我收到了这个错误:
stty: standard input: Inappropriate ioctl for device
Password:stty: standard input: Inappropriate ioctl for device
这是什么错误?我该如何解决?
【问题讨论】:
-
第一步是向我们展示脚本正在做什么导致该错误,即:“script.pl”的相关位