http://qs321.pair.com?node_id=1113449


in reply to how to dir a directory that have space

given that your $source_directory contains spaces, the system command is misinterpreted:
`dir $source_directory /b/s /o:-d`;
use system(@list) form instead:
system('dir', $source_directory, '/b/s', '/o:-d');