in reply to Checking URL's and deleting element arrays without HTML

Untested:
my @filtered_links = grep { my $response = $browser->get($_); # Better: ->head($_) $response->is_success && (($response->content_type eq 'text/html') || ($response->content_type eq 'text/plain')) } @links;

Update: fizbin's is better, use head instead of get. Anyway, I'd retain the check on is_success for documentation and readability reasons.

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.