in reply to Array Slice Referencing
That's because making a reference of a list generates a list of references:
print Dumper \( 1, 2, 3 ); #output: $VAR1 = \1; $VAR2 = \2; $VAR3 = \3;
QUESTION 2: is there any other way to generate an array reference (not a scalar references) by picking a selected data to be referenced from an array? (what happens when @_ is replaced by a scalar variable, it only gets the first index from the array slice)
I don't think you can make a reference to an array slice, but I'd be happy to be enlightened.
QUESTION 3: how come it happens that creating a new reference also creates a space in my meomory based on that program?
Sorry, I don't understand your question.
|
|---|