in reply to array of files in directory

@files=<./*>;

Replies are listed 'Best First'.
Re^2: array of files in directory
by Tanktalus (Canon) on Mar 14, 2006 at 03:39 UTC

    I was thinking glob, which is what implements the above behaviour, but then got distracted and forgot to post. However, upon seeing this, I must recommend glob over the <> operator. For starters, it's way clearer. The <> operator is already overloaded for the much more common "read from filehandle" use, so people seeing this would be easily confused, or at least have to take a second or two to recall this odd usage.

    Also, the <> operator has some weird properties when dealing with spaces and such where the glob function doesn't.

    @files = glob '*';