# Note here its just one element but it can be more my @aTmpArray=qw("CheckSDKDir()"); WriteToFile(\@aTmpArray); ..... sub WriteToFile($@) { my ($aRefArray) = $_[0]; #Checking if the array is initialized if($aRefArray->[0]) { printf( join(" ", @$aRefArray); } }