aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Custodio <pauloscustodio@gmail.com>2021-02-14 00:39:36 +0000
committerPaulo Custodio <pauloscustodio@gmail.com>2021-02-14 00:39:36 +0000
commite8a1190ebd8743bf718f9f83321acd9c83f14691 (patch)
tree8e47b13204e04db56bdd0266d501bc6a0362af78
parent49857b9ef8e4b2981187a818f820a53c815350a4 (diff)
downloadperlweeklychallenge-club-e8a1190ebd8743bf718f9f83321acd9c83f14691.tar.gz
perlweeklychallenge-club-e8a1190ebd8743bf718f9f83321acd9c83f14691.tar.bz2
perlweeklychallenge-club-e8a1190ebd8743bf718f9f83321acd9c83f14691.zip
Remove tabs
-rw-r--r--challenge-001/paulo-custodio/test.pl4
-rw-r--r--challenge-002/paulo-custodio/awk/ch-2.awk14
2 files changed, 9 insertions, 9 deletions
diff --git a/challenge-001/paulo-custodio/test.pl b/challenge-001/paulo-custodio/test.pl
index e746826428..2feb090a1e 100644
--- a/challenge-001/paulo-custodio/test.pl
+++ b/challenge-001/paulo-custodio/test.pl
@@ -50,7 +50,7 @@ for my $lang (grep {-d} sort keys %LANG) {
for my $doc (@$yaml) {
for my $spec (@$doc) {
# run setup code
- ok eval($spec->{setup}), $spec->{setup}
+ ok eval($spec->{setup}), $spec->{setup}
if defined($spec->{setup});
$@ and die $@;
@@ -76,7 +76,7 @@ for my $lang (grep {-d} sort keys %LANG) {
# run cleaup code
if (Test::More->builder->is_passing) {
- ok eval($spec->{cleanup}), $spec->{cleanup}
+ ok eval($spec->{cleanup}), $spec->{cleanup}
if defined($spec->{cleanup});
$@ and die $@;
unlink("in.txt", "out.txt", "out_exp.txt");
diff --git a/challenge-002/paulo-custodio/awk/ch-2.awk b/challenge-002/paulo-custodio/awk/ch-2.awk
index c2af383106..67b75f5c8d 100644
--- a/challenge-002/paulo-custodio/awk/ch-2.awk
+++ b/challenge-002/paulo-custodio/awk/ch-2.awk
@@ -15,18 +15,18 @@ function format_number(n, base, negative, output, d) {
else {
negative = 0
}
-
+
output = ""
do {
d = n % base
n = int(n / base)
output = substr(digits, d+1, 1) output
} while (n > 0)
-
+
if (negative)
output = "-" output
-
- return output
+
+ return output
}
function scan_number(str, base, n, negative, ch, d) {
@@ -35,7 +35,7 @@ function scan_number(str, base, n, negative, ch, d) {
negative = 1
else
negative = 0
-
+
while (str != "") {
ch = toupper(substr(str, 1, 1))
str = substr(str, 2)
@@ -47,14 +47,14 @@ function scan_number(str, base, n, negative, ch, d) {
n = base * n + d
}
if (negative)
- n = -n
+ n = -n
return n
}
BEGIN {
BASE = 35
digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-
+
if (ARGV[1] == "-r")
print scan_number(ARGV[2], 35)
else