Thanks Kevin,
That worked, finally :)
I suppose that the "\" in Perl means reference, right?
One more thing: in order to copy the length of the array, the following should be added:
$obj->{my_array} = \@another_array;
$obj->{@my_array} = @another_array;
Otherwise, I could not get the length...