learning-perl6/ch4/ex4-3.raku

10 lines
211 B
Raku
Raw Normal View History

2023-11-21 15:44:50 +00:00
sub MAIN () {
loop {
my $answer = prompt "Provide string to check for presence of Hamad\n";
$answer.contains("Hamad") ??
say "Hamad detected" !!
say "No Hamad detected";
last if $answer.chars == 0;
}
}