use strict; use warnings; my $a = 2; my @x = ( 1 .. 5 ); my @y = @x; scale_ary2($a, @y); print "\@x = @x \n"; print "\@y = @y \n"; sub scale_ary2 { my $scale = shift; $_ *= $scale for @_; 1; }