Use more elegant Perlish method to print supported languages

This commit is contained in:
Pragmatic Software 2015-01-18 18:49:36 -08:00
parent a41906d323
commit a0f0249c8f
1 changed files with 1 additions and 7 deletions

View File

@ -17,13 +17,7 @@ eval {
my @languages = glob 'languages/*.pm';
my $comma = '';
print "Supported languages are: ";
foreach my $lang (sort @languages) {
$lang = basename($lang);
next if $lang =~ m/^_|~$/g;
$lang =~ s/\.pm$//;
print "$comma$lang";
$comma = ', ';
}
print join(", ", grep { $_ = basename $_; $_ =~ s/.pm$//; $_ !~ m/^_/ } sort @languages);
print "\n";
exit;