From: Simon Ruderich Date: Wed, 2 Apr 2014 21:10:15 +0000 (+0200) Subject: bin/remove-continuation.pl: minor cleanup X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=fe929ed681f18cb76df46f10da5166a9fe69d211;p=config%2Fdotfiles.git bin/remove-continuation.pl: minor cleanup --- diff --git a/bin/remove-continuation.pl b/bin/remove-continuation.pl index 8658df8..df36d33 100755 --- a/bin/remove-continuation.pl +++ b/bin/remove-continuation.pl @@ -24,17 +24,17 @@ use warnings; my $continuation = 0; -while (my $line = <>) { +while (<>) { # Remove leading whitespace if the last line was a line continuation. if ($continuation) { - $line =~ s/^\s+//; + s/^\s+//; } - if ($line =~ /^(.+?)\\$/) { + if (/^(.+?)\\$/) { print $1; $continuation = 1; } else { - print $line; + print $_; $continuation = 0; } }