如何搜索所有.XXX文件的目录,并在Perl中获取它们的列表?
问题描述:
我需要在目录中搜索以.123结尾的所有文件。
I need to search in a directory for all the files that end in .123.
如何(使用Perl)获取这些文件的列表?
How do I (using Perl) get a list of those files?
答
只需:
@files = glob "$dirname/*.123";