Perl脚本:列出目录下所有的文件扩展名(后缀名)
?
#!/bin/perl use strict; my %extname_list; sub process_file { ??? # Ignore the directories . and .. ??? (my $ext_name) = ($cur_file =~ /.(w+)$/); ??? if (defined ($ext_name)) { #??? print $cur_file,"n"; my @DIRLIST = (".");? print "Extension filenames:n"; foreach my $item (keys %extname_list) { ??? print $item,"n"; } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |