Help for this page
my $path = 'yourdir/yoursubdir/'; # or whatever my @filearray; while (<$path*>) { s/$path//; # strip off the filepath push @filearray, $_; # push the filename into the array }
while (my $file = <$path*>) { $file =~ s/$path//; push @filearray, $file; }