File: num.pl

package info (click to toggle)
libio-prompt-perl 0.997002-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 240 kB
  • ctags: 20
  • sloc: perl: 846; makefile: 2
file content (11 lines) | stat: -rwxr-xr-x 253 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl

use IO::Prompt;

# You can constrain input to be numeric, or even integral...

my $how_many = prompt -number => 'How many? ';
print "You asked for $how_many\n";

$how_many = prompt -i => 'How many? ';
print "You asked for $how_many\n";