#!/usr/bin/perl -w use strict; use warnings; my @array1 = (1,2,3,4,5,6,7,8,9,10); my @array2 = (10,20,30,40,50,60,70,80,90,100); my @array3 = (100,200,300,400,500,600,700,800,900,1000); my @array4 = (1000,2000,3000,4000,5000,6000,7000,8000,9000,10000); reverse_all_arrays(\@array1, \@array2, \@array3, \@array4); sub reverse_all_arrays{ @$_ = reverse(@$_) for(@_); }