Re: Dir Command to an array



On Fri, 28 Oct 2005 andrewmchorney@xxxxxxx wrote:

> I would like to execute a dir */s command in windows and save the
> output into an array. I know I can do this in perl by doing executing
> the following command in a perl script:
>
> @allfiles = `find / -print`;

You can, but you shouldn't.

The tool you're looking for, on Unix or Windows, is File::Find:

$ perldoc File::Find

It should, I believe, be a core module with recent Perl versions.


--
Chris Devers

?õùo ¯áVÑ?¸