You wondered about whether you can do @array = readdir(DIR)
I wonder why you wonder :-). You could've just consulted the perldocs for the answer since it clearly states that:
readdir DIRHANDLE
Returns the next directory entry for a directory
opened by "opendir". If used in list context,
returns all the rest of the entries in the direc-
tory. If there are no more entries, returns an
undefined value in scalar context or a null list
in list context.
Does this help?Aziz,,,
In reply to Re: opendir, readir into @array in one line?
by abstracts
in thread opendir, readir into @array in one line?
by c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |