in reply to Loading an array with file names

You could do something like this using back ticks to issue a dos command and capture the results in an array
#!/usr/bin/perl $folder = 'C:'; $input = $ARGV[0]; @array = `dir /b ${folder}\\${input}`; foreach (@array) { print "$_"; }
You could remove the $folder variable and set it to $ARGV1 to allow the second command line variable to be the path of where you are searching.

Example script.pl *.txt C: would seach the C:\ directory for anything ending in .txt