in reply to Executing a external command
I don't think dir is an external command, but a builtin cmd command. If you want to list files from directories, I advise you to use File::Find or File::Find::Rule.
Igor 'izut' Sutton
your code, your rules.
In Section
Seekers of Perl Wisdom