sub yn {
local ($prompt) = @_ ;
print STDOUT $prompt ;
local($reply) = scalar ( < STDIN > ) ; # local($reply) = < STDIN > ???
$reply =~ /^y/i ;
}
...
$walk if &yn("I'd walk a mile for the Camel Book. Would you?");
$bestday = &max($mon, $tue, $wed, $thu, $fri) ;
...
sub max {
local($max) = pop(@_) ;
foreach $foo (@_) {
$max = $foo if $max < $foo ;
}
$max ;
}
sort ( SUB, LIST ) sort ( LIST ) sort SUB LIST sort LIST
This is Daisitish, an axiomatic tester used in COMP204