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; } }