alessandro.forghieri
Recent Actions
-
Commented on What's the difference between arrays and lists?
So far, lists seem to me coincident with 'array literals'. That is the way I always referred to the (1,2,3) construct, and the name analogous constructs get in other programming languages. (With python, with its tuples, being the odd man...
Comment Threads
-
Ether commented on
What's the difference between arrays and lists?
Arrays *can* be passed to subroutines, in the sense that the original array can be modified by the sub:
perl -wle'sub foo { $_[0] = "ohhai" }; my @arr = (0,1,2); foo(@arr); print "@arr"'
-
Mike Friedman commented on
What's the difference between arrays and lists?
You can modify the values in the array, but you're still not passing the actual array to the sub; @_ just has pointers to the list of SV *'s in the stack.
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.