diff options
author | Florian Pritz <bluewind@xinu.at> | 2012-12-30 20:49:44 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2012-12-30 20:50:53 +0100 |
commit | da4b77ab4deb7eb84e6cb68db5d5669363712b38 (patch) | |
tree | 9e0fd458f0f81459a83bb4b91bbc27a832c17edb /long-lines.pl | |
parent | 30fa1c6d89f84fe41b6674d3713d7b6af3bc75d8 (diff) | |
download | bin-da4b77ab4deb7eb84e6cb68db5d5669363712b38.tar.gz bin-da4b77ab4deb7eb84e6cb68db5d5669363712b38.tar.xz |
long-lines.pl: switch spaces to tabs
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'long-lines.pl')
-rwxr-xr-x | long-lines.pl | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/long-lines.pl b/long-lines.pl index d0f0c21..c0e1da0 100755 --- a/long-lines.pl +++ b/long-lines.pl @@ -9,12 +9,12 @@ my %opt; getopts("hm:t:", \%opt); if (@ARGV == 0 || $opt{h}) { - print "usage: ", basename($0), " [options] file(s)...\n\n"; - print "Options:\n"; - print " -m NUMBER maximum chars tolerated per line (default: 80)\n"; - print " -t NUMBER count \\t as NUMBER chars (default: 4)\n"; - print " -h this help\n"; - exit 0; + print "usage: ", basename($0), " [options] file(s)...\n\n"; + print "Options:\n"; + print " -m NUMBER maximum chars tolerated per line (default: 80)\n"; + print " -t NUMBER count \\t as NUMBER chars (default: 4)\n"; + print " -h this help\n"; + exit 0; } my $max = 80; @@ -25,13 +25,13 @@ $max = $opt{m} if ($opt{m}); $Text::Tabs::tabstop = $opt{t} if ($opt{t}); for my $file (@ARGV) { - open FILE,"<", $file; - $line = 0; - while (<FILE>) { - $line++; - $_ = expand $_; - if (length > $max) { - print "\"$file\" - line $line: ", length, " chars\n"; - } - } + open FILE,"<", $file; + $line = 0; + while (<FILE>) { + $line++; + $_ = expand $_; + if (length > $max) { + print "\"$file\" - line $line: ", length, " chars\n"; + } + } } |