Mega Code Archive
Categories
/
Perl
/
File
Reading the contents of a directory
# @list = glob(expression); # The expression needs to be a shell-style wildcard, such as *.pl for all file names ending in .pl. #!/usr/bin/perl -w @list = glob("*.pl"); print ".pl files: @list";