From nobody Mon Nov 15 23:44:36 2021 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 66B34188AEBA for ; Mon, 15 Nov 2021 23:44:59 +0000 (UTC) (envelope-from freebsd.ed.lists@sumeritec.com) Received: from out2-86.antispamcloud.com (out2-86.antispamcloud.com [185.201.17.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4HtQlv1VLdz3k4M for ; Mon, 15 Nov 2021 23:44:59 +0000 (UTC) (envelope-from freebsd.ed.lists@sumeritec.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=out.niagahoster.com; s=spamexpert; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date: reply-to:sender:bcc; bh=MAGkDm9tlxVdEOB5hl77SQn2M0qw8G/YqvSegAZPZr4=; b=F/EhV Iyz/SE8pJI8Xgv+E+ANYTcUQEdTEIAYcwvTt22u7A7NHILaZYYtPDDDEyrJ8EY0wKeksAbNyBLdaZ EQJwncvVLzXc4aBxupA0ZV7OGRkZpHZRGodltXuOTbC4Wgr0HGpW2LYS0Ptv/PYr9WuijqXMbWGJ+ UTOc60GUOEKq61G8qbA2vIedVLwLd1PpbfI9rFxbfoQE9tDwYMmGLcdu2ln6GKfNepdbeNBBv24hI HC4b9V61TpJ+NT9J+wDe88Lca2lq67oBIPSVLFdwoXG88lQExFzMzSfOSn2JzifaoWEN6fd5FAixn s+zem3HkMnXZHg1izWzlHcBEYJ6ug==; Received: from srv31.niagahoster.com ([153.92.8.106]) by mx62.antispamcloud.com with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1mmlec-0000c6-HD; Tue, 16 Nov 2021 00:44:52 +0100 Received: from subs08-103-10-67-168.three.co.id ([103.10.67.168]:50977 helo=Ryzen1.sumeritec.com) by srv31.niagahoster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mmleP-0007xY-KL; Tue, 16 Nov 2021 06:44:41 +0700 Date: Tue, 16 Nov 2021 07:44:36 +0800 From: Erich Dollansky To: Odhiambo Washington Cc: questions Subject: Re: Looking for a 3rd eye - perl errors Message-ID: <20211115234436.451ee5a4.freebsd.ed.lists@sumeritec.com> In-Reply-To: References: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AuthUser: freebsd.ed.lists@sumeritec.com X-Originating-IP: 153.92.8.106 X-Spampanel-Domain: out.niagahoster.com X-Spampanel-Username: niaga X-Spampanel-Outgoing-Class: ham X-Spampanel-Outgoing-Evidence: Combined (0.07) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT9u/J/b2Wo5StppEEm3FgzNPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5y9ETpuP1sz40hlOgsszV660oWRmY7iN+NHb+alJ/q7uqvj wL78vNGpXMQtd/U0tSyzFTRqUk3xj4GX+CqJAgxToQQHiFeSaW+syz9K5mWBV2Xx2azEPCntGfKY yhVHoImfImldfmW/tJQSNtT80uJKMCzr0VBuihcGaoO2kWV3XcTUTqkijca8GaVW4cp3a2VUO5tT aSa1pwLo22IK6dztq4SVLmCYxl2D5GWGcDlworN18+A+Yl8a4/GQmco+f5EhEWyJzIkwSFAW0Pw8 uiKeJC6qhj3YksWYqtRynjzfiYdpU1PrTsz2Rk0RohBJRyFfAzdAvTLhqJfPeK5nxC8nf9hCjPbo IO40etUTsFTdhheVmadwI3aEZBK0q1jHyUAk61l/kva6+iLajaOSOgRhUHn+gnmsNLchHhymY5JU 63hy/sIYQHSrltYx0aSLXrYfouEbBjgDbGgO65Dn/Kq0XSSDn3TEHS9pAbntj2AHd4/QRUYnRtop VCx4Q8MaMgebtFWEMLqsZqM85AyyKVDKBkiY9v1Rlez6jmoRl5GlOLcFP/Fxqx7uULDQRB3NLRAT IfXS1TYsixiMS4ScgCFgSCoC7XWrv4HyiAw0UI0Ulhs28iTUw/3CFJ8PO1s8RWB9unLkiGyNoLJW 0Tk84xIuQSSf7E8TYrwtpS2axV7S63UwgAn+Bkpv32K05+SQmL2e+PcCMjPV5V1RtaWq4BJBVLmn 9E+h0mHeaLQFksyUudGEPEtCvtj/W4eTF3+V0eTuFzpCqDuvGeOyrZdVjpvbb72liMUMOG8An2hA GwoR5imB6TQSSqg34K4FLJnYFeGEy7zy/zb0MKlnP5LdI0Qckm/z3VL6zJzbWXNb9na6v5zRPA8g EmeeAc/z3AcElOsHPl1wpAKCb1HoOSsBxICVFqYuuuSAFWQsbrYYEBlsTpnckpWaLvahyBjmQxBK Ozue53QSV233OdHvpYrvCQQO9JTyL+d7GjrYEhpwz9pz850Fo+dPpwTl8j0GWpzr2Wg= X-Report-Abuse-To: spam@quarantine10.antispamcloud.com X-Rspamd-Queue-Id: 4HtQlv1VLdz3k4M X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, if you cannot get an answer here, you might have a try with more PERL orientated lists like: https://lists.freebsd.org/subscription/freebsd-perl Erich On Mon, 15 Nov 2021 13:00:26 +0300 Odhiambo Washington wrote: > Hi everyone, > > Looking for a 3rd eye here: > > In the code below, I am getting these errors: > > > 1. > sub mp3_filter($$$$) { > my ($contref, $weighted_str, $fields, $headings) = @_; > > mp3::get_title($$contref, $weighted_str, $fields); > mp3::get_author($$contref, $fields); > mp3::get_album($$contref, $fields); > $$contref =~ s/^\w+:{1,1}?//gm; <= Error: Useless use of > greediness modifier '?' in regex; marked by <-- HERE in m/^\w+:{1,1}? > <-- HERE > > > 2. > sub get_uri ($$) { > my ($cfile, $fields) = @_; > > my ($uri); > my (%param); > if ($cfile =~ /^(.*)\/d(\d\d\d\d*)([0-1]\d)([0-3])(\d)\.hnf$/) { > $param{'year'} = $2; > $param{'month'} = $3; > $param{'day'} = $4 . $5; > $param{'hiday'} = $4; > if ($param{'day'} < 11) { > $param{'abc'} = "a"; > } > elsif ($param{'day'} < 21) { > $param{'abc'} = "b"; > } > else { > $param{'abc'} = "c"; > } > if ($hnf::link_templ) { > $uri = $hnf::link_templ; > } > elsif ($hnf::hns_version >= 2) { > $uri = '?%year%month%abc#%year%month%day0'; # for hns-2.00 or > later } > else { > $uri = '?%year%month%hiday#%year%month%day0'; # for hns-1.x > } > $uri =~ s/%%/\34/g; > $uri =~ s/%{?([a-z]+)}?/$param{$1}/g; <======Error: Unescaped > left brace in regex is passed through in regex; marked by <-- HERE in > m/%{ <-- HERE ?([a-z]+)}?/ > $uri =~ s/\34/%/g; > $uri = $hnf::diary_uri . $uri; > $uri =~ s/%7E/~/i; > } > $fields->{'uri'} = $uri; > $fields->{'author'} = $hnf::author; > } > > >