in reply to check if a number is in a list

You can also use Perl6::Junction for a more "natural" way:
use Perl6::Junction qw/any/; if (any(@list_of_values) == $value) { ... }