/usr/share/doc/libio-prompt-perl/examples/default.pl is in libio-prompt-perl 0.997001-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #! /usr/bin/perl -w
# Yes/no input only, with defaults set...
use IO::Prompt;
until (prompt "yes? ", -default => "N", -YN1) {
print "That's a 'no'\n";
}
while (0 + prompt "next: ", -d => "-1") {
print "That's non-zero\n";
}
while (prompt "****: ", -d => "secret", -e => '*') {
print "That's '$_'\n";
}
print "\n";
while (prompt "**** [or default]: ", -d => "secret", -e => '*') {
print "That's '$_'\n";
}
|