Search your unanswered perl queries
Google

Tuesday, November 27, 2007

One Liner : List all files of a directory.

If one wants to list all the files and directories from a particular directory here is the onliner for the same. We use IO::ALL for this purpose in this post.

perl -MIO::All -wle "my $io = io('e:/downloads'); print $io->All;"

and the output will list all the directories and files in downloads folder.

Comments and other ways are alwayz a welcome.

No comments: