dir likely is not an external program but a shell built-in. Thus your backticks fail, and thus $newTest is undef. You can inspect $? and $! for the error(s). Maybe you meant to run cmd /c dir, or maybe you wanted readdir, glob or File::Find?
In reply to Re: Executing / Retrieving Output from Command
by Corion
in thread Executing / Retrieving Output from Command
by rpike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |