$path = "C:\\songs\\"; chdir $path; @list = glob("*.mp3"); for $filename ( @list ) { print "$filename\n"; }