in reply to Not understanding 2 sentences in perldoc
There is one other surprise in here that I once found the hard way: plain assignment will operate on lists, but modifying assignments (+= in the example that I recall) will not — if you try to increment a group of values, only the last item in each list is affected.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A list assignment gotcha (updated)
by AnomalousMonk (Archbishop) on Jul 30, 2020 at 03:38 UTC | |
by jcb (Parson) on Jul 31, 2020 at 01:26 UTC | |
by etj (Priest) on Apr 21, 2022 at 07:26 UTC | |
|
Re: A list assignment gotcha
by LanX (Saint) on Jul 30, 2020 at 11:37 UTC | |
by choroba (Cardinal) on Jul 30, 2020 at 13:02 UTC | |
by LanX (Saint) on Jul 30, 2020 at 14:48 UTC | |
by jcb (Parson) on Jul 31, 2020 at 01:32 UTC | |
by LanX (Saint) on Jul 31, 2020 at 02:20 UTC | |
|