From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 52A7B1F5B1 for ; Thu, 30 Jul 2020 14:58:41 +0000 (UTC) Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 4C5146AB74; Thu, 30 Jul 2020 10:58:40 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=JvaBdOONvsQP0d8S/EjPGFcyCA4=; b=I9vK6w mRuNsLEYx+gvaXKIYL1snItSx3TM+t5bon8EAfS6DCKblIabgDgpGUusqCB8QpTw WBihTwGyw1rE9dndlBnaBzLGw4c80bshCfbNonpjYvBhHczlVPynbUvQlQrS2d5o +DpeLl3DLsbRlA3Dh65Q5O0a69UiXcDAMnqy4= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 44BB26AB73; Thu, 30 Jul 2020 10:58:40 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=ahvOyhg8YnwiyFhlU9CHDJHxVg00EsWelfPX6YEyjYM=; b=h0nkLRNMLS8K1R7Z3EJWEXIUnACD/uDCiRFjy4VphLraMMEY7qKK8F+mAkQQ8pudiV+bAWzg2RXBOWudjK8vXkih9ZoAN2KdZrHt8I2iPLqh0A/+aevrPh1iu+OzYe7pr3piw9u6asolvobax0QiNhArrWnhC7gnN5TGomKXhgw= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 9882B6AB72; Thu, 30 Jul 2020 10:58:39 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Eric Wong Cc: meta@public-inbox.org Subject: Re: [PATCH] wwwlisting: fix grep call for match=domain filtering In-Reply-To: <20200730080353.GA14766@dcvr> References: <20200730053055.30972-1-kyle@kyleam.com> <20200730080353.GA14766@dcvr> Date: Thu, 30 Jul 2020 10:58:38 -0400 Message-ID: <87tuxpkq1t.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 270D91CE-D275-11EA-B5E1-2F5D23BA3BAF-24757444!pb-smtp2.pobox.com List-Id: Eric Wong writes: >> sub list_match_domain_i { >> my ($ibx, $arg) = @_; >> my ($list, $hide_key, $re) = @$arg; >> - if (!$ibx->{-hide}->{$hide_key} && grep($re, @{$ibx->{url}})) { >> + if (!$ibx->{-hide}->{$hide_key} && grep(/$re/, @{$ibx->{url}})) { > > Gah, I keep getting languages/behaviors confused :x > > Especially confusing since `$string =~ $re' is documented > in perlop(1) as being equivalent to `$string =~ /$re/' Ah, good to know you find that bit in the documentation confusing too. It had me scratching my head when I was debugging this, but I wasn't sure if I was just missing something that would be obvious to someone who knows perl.