for my $file (@files) { heavy_lifter($file); } sub heavy_lifter { my $file = shift; # heavy stuff }