This is perhaprs a very simple question. However I would like to automatically list the files in a directory an store them in array. So I use globbing, which I do as follows:
@files=</path/to/dir/*.type>
That works out well. The problem I have is that I what to give it variable (which is taken is as a parameter by the perl script. This however doesn't appear to work. I am doing the following
$path_to_dir = $ARGV[0];
@files=<$path_to_dir>
Any advice on how this could work..?
THANKS!
In reply to Globbing uncertainty by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |