Your code, as presented, should work, so long as the $dir in question can be accessed from your shell.
In reply to Re: Reading a Directory on another server
by Callum
in thread Reading a Directory on another server
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |