File: yesno.pl

package info (click to toggle)
libio-prompt-perl 0.997001-1%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 276 kB
  • sloc: perl: 846; makefile: 2
file content (19 lines) | stat: -rwxr-xr-x 594 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/perl -w

# Variations on the yes/no theme...
#

use IO::Prompt;

1 until prompt(-YN1,    "Continue char (Y/N): ");
1 until prompt(-yn1,    "Continue char (y/n): ");
1 until prompt(-yesno1, "Continue char (y/n): ");
1 until prompt(-yes1,   "Continue char (y/*): ");
1 until prompt(-YES1,   "Continue char (Y/*): ");
1 until prompt(-Y1,     "Continue char (Y/*): ");
1 until prompt(-yn,     "Continue line (y/n): ");
1 until prompt(-yes,    "Continue line (y/*): ");
1 until prompt(-YN,     "Continue line (Y/N): ");
1 until prompt(-Y,      "Continue line (Y/*): ");

print "Done\n";