midichannels.pl: support indented commands
authorRudolf Polzer <divVerent@xonotic.org>
Thu, 22 Mar 2018 00:45:31 +0000 (17:45 -0700)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 22 Mar 2018 00:45:53 +0000 (17:45 -0700)
misc/tools/midichannels.pl

index 4f47b9f..0223e82 100755 (executable)
@@ -60,7 +60,7 @@ for(@others)
 while(<STDIN>)
 {
        chomp;
-       my @arg = split /\s+/, $_;
+       my @arg = grep { $_ ne '' } split /\s+/, $_;
        my $cmd = shift @arg;
        print "Executing: $cmd @arg\n";
        if($cmd eq '#')