Keep It Simple, Stupid | |
PerlMonks |
Re^7: Pointers and Referencesby LanX (Saint) |
on Nov 24, 2020 at 19:52 UTC ( [id://11124155]=note: print w/replies, xml ) | Need Help?? |
Lists in Perl are two things:
Array is
So @a = (1,2,3) means step by step
I hope it's clearer now. If it's a consolation, Larry occasionally confused the terminology too, e.g. in wantarray :) > (Modification of a read-only value attempted) That's because 1,2,3 are literals which are read only. Use variables (sic) and you can change them in the loop. ;)
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|