in reply to Adding Files in a directory to an array

Here are a couple of different ways....

my $x = '~/tmp/*'; my @list = glob($x); print join '-', @list; $x = '/home/caillte/tmp/'; opendir(X, $x) or die "$!"; @list = readdir(X); closedir(X); print join '-', @list;

How they differ..... Glob uses a shell to expand the argument... therefore you can specift the argument in the same way you would on the command line. Opendir, readdir and closedir treats the directory as if it were a file, giving you faster access, on general, than glob() and more flexibility. However, glob() works exactly like your shell does, giving you access to special characters like '~'.

$japh->{'Caillte'} = $me;