# Pastebin lmQ7jGHc #!/usr/bin/env raku use WWW::Mechanize:from; my $rss_types = < application/rss+xml application/xml application/rdf+xml text/xml >; sub MAIN($url = 'https://phoenixtrap.com') { my $mech = WWW::Mechanize.new; my $response = $mech.get($url); if ($response.content_type ~~ /html/) { # find the feed in the HTML my $alt_links = $mech.find_all_links(rel => 'alternate'); say $alt_links.first(*.attrs eq 'application/rss+xml').url; # output: https://phoenixtrap.com/feed/ try say $alt_links.first(*.attrs ~~ $rss_types).url; say $!; # output: Cannot use Bool as Matcher with '.first'. Did you mean to use $_ inside a block? say $alt_links.first( {$_.attrs ~~ $rss_types} ).url; # output: Nil } }