in reply to Passing Lists to Functions?

Also note that arguments are passed into subroutines in the array @_ so you need to populate your variables from that. It might also be an idea to change the name of the array reference to avoid confusion.

sub shiftProtein { my ( $ref_to_reduced_protein, $shift_x, $shift_y, $shift_z ) = @_; my @reduced_protein = @$ref_to_reduced_protein; ...

I hope this is of use.

Cheers,

JohnGG