From 31a7001b38427163276645450129bb537982de24 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 16 Apr 2014 19:43:25 +0000 Subject: [PATCH] ssoma: use implicit $_ for simpler arg generation This makes the loop shorter and judicious use of $_ is OK. --- ssoma | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ssoma b/ssoma index c575e3d..1f68f6b 100755 --- a/ssoma +++ b/ssoma @@ -73,13 +73,13 @@ sub usage { } my $opt = $cmd{$c}->{opt} or next; - foreach my $s (sort keys %$opt) { + foreach (sort keys %$opt) { # prints out arguments as they should be passed: my $x = s#[:=]s$## ? '' : (s#[:=]i$## ? '' : ''); - print $fd ' ' x 21, join(', ', map { length $s > 1 ? - "--$s" : "-$s" } - split /\|/, $s)," $x\n"; + print $fd ' ' x 21, join(', ', map { length $_ > 1 ? + "--$_" : "-$_" } + split /\|/, $_)," $x\n"; } } exit $exit; -- 2.11.4.GIT