Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (13 sloc) 0.468 kb
#! /Users/damian/bin/rakudo'
use v6;
use IO::Prompter;
loop {
my $name = prompt("Name:") // last;
my $age = prompt("Age:", :integer, :must({'be positive' => {$_ > 0}}) )
// last;
my $married = prompt("Married?", :yesno) // last;
report($name, $age, $married);
}
sub report ($name, $age, $married) {
say " $name (aged $age) is{$married ?? '' !! "n\'t"} married";
}
Jump to Line
Something went wrong with that request. Please try again.