#!/usr/bin/perl -w use strict; my @x=0..10; sub dbl { foreach(@_){ $$_*=2 } } dbl(\(@x[1,2,3,5,6,7])); print join ",",@x; print "\n";