Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!not-for-mail From: tmcd@panix.com (Tim McDaniel) Newsgroups: comp.lang.perl.misc Subject: Re: this should work Date: Thu, 11 Jul 2013 08:02:52 +0000 (UTC) Organization: Tim McDaniel's at Panix Lines: 22 Message-ID: References: <100720131549354102%jimsgibson@gmail.com> Reply-To: tmcd@panix.com NNTP-Posting-Host: panix3.panix.com X-Trace: reader2.panix.com 1373529772 4739 166.84.1.3 (11 Jul 2013 08:02:52 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Thu, 11 Jul 2013 08:02:52 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Xref: csiph.com comp.lang.perl.misc:8645 In article , George Mpouras wrote: >it is a perl bug or bad behavior , should change. I don't like it -- it's an "action at a distance spookiness" effect that I've found little use for. I just work around it. You have just had the documentation quoted and explained. It's a long-standing aspect of Perl. I call something a "bug" when it's a result that does not match the documentation, so you have no right to call it a "perl bug". "Misfeature" or "bad design": aliasing something to each item in turn, where changing the variable changes the underlying thing, is documented in several areas and decades old. If you don't like it, it has an immediate and obvious workaround: assign it to a temporary. TL;DR: Quit whining. Learn when aliasing happens and don't change aliased variables (unless you have a need for it). -- Tim McDaniel, tmcd@panix.com