Actually, ls -l /a_dir will not list the contents of a_dir's subdirectories on any Unix flavor that I've used. Maybe you are thinking of ls -l /a_dir/* which will do exactly what you described because the shell will expand the glob "/a_dir/*" and then hand that list of arguments to ls, and, of course, when ls is handed a directory name as an argument it lists the contents of that dir.
But yes, a total forehead slap on the situation with spaces in file names messing up my array ordering. Yet another solid reason to keep it all Perl.