Article View: perl.beginners
Article #1Re: Duplicates list
From: Uri Guttman
Date: Thu, 22 May 2025 18:46
Date: Thu, 22 May 2025 18:46
22 lines
5082 bytes
5082 bytes
On 5/22/25 14:39, ypeng@pobox.be wrote: > Hello > > When I say (β?β) x 3 > I get: (β?β, β?β, β?β) > > I donβt know what happens. > Is this a new syntax for perl it is very old syntax (i think even back to perl4). the x operator duplicates the left side by the count on the right side. if the left is a scalar, the duplicates are merged into a single scalar. if the left side is in (), it is assumed to be a list and the duplicates are merged into a list. so what you see is a list of '?' duplicated into the list you got. you can read more about x in perldoc perlop. uri -- https://uriguttman.blogspot.com/ A Long Strange Trip A blog about computers, food, my life and silliness.
Technical Details
Message-ID:
<f8860329-6c61-4dd8-a908-2f3f5b765981@perlhunter.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!ygg-srl.newsdeef.eu!srl.newsdeef.eu!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!nntp.perl.orgReferences:
<ace5327074e086658cb1da2630d08b04@pobox.be>Show Full Headers
Complete Article Headers
Message-ID: <f8860329-6c61-4dd8-a908-2f3f5b765981@perlhunter.com> Subject: Re: Duplicates list Date: Thu, 22 May 2025 14:46:39 -0400 From: uri@perlhunter.com (Uri Guttman) References: <ace5327074e086658cb1da2630d08b04@pobox.be> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!ygg-srl.newsdeef.eu!srl.newsdeef.eu!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!nntp.perl.org Newsgroups: perl.beginners Return-Path: <uri@perlhunter.com> Mailing-List: contact beginners-help@perl.org; run by ezmlm Delivered-To: mailing list beginners@perl.org Received: (qmail 1458 invoked from network); 22 May 2025 18:46:50 -0000 Received: from xx1.develooper.com (147.75.38.233) by x6.develooper.com with Received: from inbound-egress-7.mailchannels.net (inbound-egress-7.mailchannels.net [23.83.220.5]) by xx1.develooper.com (Postfix) with ESMTP id BD5C67C1BB for <beginners@perl.org>; Thu, 22 May 2025 ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1747939603; a=rsa-sha256; cv=none; b=aDj1Vih6Is1fXtn6GSJWTHElEIm4+SSaJ1VITIOMv4B6tuEoa7ccQT7zetU6W/LdhejOUp TlkX82w33mpmLCN6tOlwHtuOAid+bAxFy4defKKeJvv+/H+S0/bomRqGhW2pYTzB4CUMr6 lbaRul1gYMFIFvdahMJNH//BwkLQnLG4H1ULN9Y+nke4r+5JFvau9Y11idhjHp0wa3VJSs Iy5pLziAat+0hHlO3L0y5+daeKghMyCMeLBUZHfGJKHbBjFOhgGgXTu6Y23RxknSrpZPeF pOvVsCcpUfF2fIUe2VSmAtSCWdvAAdYGh5ZUbroL/4g7Gq2cNJtTSljbqnMe5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1747939603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=KKOgIQ8iUQjR1Ctg7RL1Nj3UmsC+/vupmOA4z30YUyM=; b=tp7nzj6gZdRlbK7YVtqboWxbLd8xjArpEPUcunNmqjec+uUcZF4mY0mpD1uEySrNEPnzzD mX8YZRzooDX/l7E/sAnWVag+BKmHnzr+kx7VqiUuOmhmLj1OsUW438gk8SGGv3WYzL2ubQ BbMNOaaolhoAp1Evz2UTzGSEXPN3jTPzBFWBvGKAZQziF9shMfXlwxT5kpkkxqFuRsDIa7 86jH27iwLaelzRGz8ybtCdEx27x039l6gDHLq0bUlWJN9Oxt2JJEnwAuT+ESFksKT4kKxg oGH+WTgok9cfEt2ANByDLYx0hLtthn5FdlZx9Iu9VVf9WMxbSqch/8XX2Xz9Nw== ARC-Authentication-Results: i=1; inbound-rspamd-6bd549b488-97jtk; none X-Message-ID: nQt7ooiQFGSBf2cvWdLCyQMk Received: from sysarch.com (sysarch.com [65.49.50.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.113.194.163 (trex/7.0.3); Thu, 22 May Authentication-Results: inbound.mailchannels.net; spf=none smtp.mailfrom=uri@perlhunter.com; dkim=temperror header.d=sysarch.com; dmarc=none; arc=none Received-SPF: none (dmarc-service-769c548cc-dbv5t: perlhunter.com does not provide an SPF record) client-ip=65.49.50.30; envelope-from=uri@perlhunter.com; helo=sysarch.com; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sysarch.com; s=quebec-20230612-111928; t=1747939599; bh=KKOgIQ8iUQjR1Ctg7RL1Nj3UmsC+/vupmOA4z30YUyM=; h=Received:Message-ID:Date:MIME-Version:User-Agent:Subject:To: References:Content-Language:From:Organization:In-Reply-To: Content-Type:Content-Transfer-Encoding; b=axqKWI2z7znEnFkdC0F7gkUb5sFyqqNKr8Kd39PYeaM/Xzf/Raxx2UAPzoDaAiaFM VLkhGGn0DgXbbWSIoIGIdKA2v4y6qEnnj4Ev3EgP0YruquRQlo+R61Vxz/KAekW+X+ UVu2PwbU771qDbCTAMDsidwcl0lnio3Hrd6oougGPhojHH3K3JgEspnCbxCdECnENo epgw2tAsuEdE8hGal2GyTEzxcykN/0j4TR1sKCdRsXYOPkuC9kxYdhtXswkO1P7kvg /DH6/onUSpkwy1KeDqlan/nD0W8YnDmmA33LBNIyN4CMfWfIBgt1KBKG6byk/h9p9X 8Mbo1+u6vuuMu4g3rgBc6QXtVH+JYdPScP3HHbyyNpMMK+lc8yZ9S5oVfBVjDX5WND Q52mABAhpArSuDstVi7W4LofUaw16H/P18ncBRkbITeCPugecqSbzJUTcJBi72uo+z jJztqjGzIqBdWBkJ4NCpCY2RhMmyvLPIhIzMc+oIwnnFXB3nHV+QTJ580sdM/dpM1Z m23kBU0VSawNo3DCW9MvvLH1zZVJsrSbxQMFm7N0UiiU1fOk2bGZ4M3YRegZYu+X0A wANflDhomAm8JCiHCG3dYCVfLCNs7glTLiVFZqMoppPqDac46z5wa1X4kWDcwF3LuN ok8pzm7ZW/LNhEfRvPCn3tHQ= Received: from IPV6:2601:189:8580:8ed0:8781:a074:165f:b387 ([2601:189:8580:8ed0:8781:a074:165f:b387]) by sysarch.com for MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: beginners@perl.org Content-Language: en-US Organization: Which Clone Am I? In-Reply-To: <ace5327074e086658cb1da2630d08b04@pobox.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Approved: news@nntp.perl.org