in reply to Recusive reference to an array

I was not exactly sure what you were trying to do i.e. where were you giving a value to $path and whether or not the &GetDirArray was a seperate subroutine or a typo which meant to be updateArray. At any rate, the code below should help you with your array referencing.
#!/usr/bin/perl -w use strict; my @filesArray=(); my $path = shift @ARGV; &updateArray($path,\@filesArray); foreach my $name (@filesArray) { print $name . "\n"; } sub updateArray{ my $newPath = shift; my $arrayRef = shift; opendir(FP, $path) or die "Could not open $path: $!\n"; my $spath = ""; my @dirList = readdir(FP); foreach my $i (@dirList) { if (($i ne ".") && ($i ne "..")) { push @$arrayRef, $newPath."/".$i; $spath = $newPath."/".$i; if( -d $spath ) { &updateArray($spath,$arrayRef); } } } closedir(FP); }
Jeremy