From a0f0249c8f223e7b4bb07ab2ac3800d1e26e345f Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 18 Jan 2015 18:49:36 -0800 Subject: [PATCH] Use more elegant Perlish method to print supported languages --- modules/compiler_vm/compiler_vm_client.pl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/compiler_vm/compiler_vm_client.pl b/modules/compiler_vm/compiler_vm_client.pl index 75624dab..c94f0d01 100755 --- a/modules/compiler_vm/compiler_vm_client.pl +++ b/modules/compiler_vm/compiler_vm_client.pl @@ -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;