diff options
| author | Paulo Custodio <pauloscustodio@gmail.com> | 2021-12-17 18:11:08 +0000 |
|---|---|---|
| committer | Paulo Custodio <pauloscustodio@gmail.com> | 2021-12-17 18:11:08 +0000 |
| commit | 8e2ca29751bbf4ce185f2b5766510334363c4293 (patch) | |
| tree | 16c677ee168968a6a41ff8a3451975ec47efa4d7 /challenge-001 | |
| parent | ef3944bc3d9772d7a4b950682a046e0fb185f8d8 (diff) | |
| download | perlweeklychallenge-club-8e2ca29751bbf4ce185f2b5766510334363c4293.tar.gz perlweeklychallenge-club-8e2ca29751bbf4ce185f2b5766510334363c4293.tar.bz2 perlweeklychallenge-club-8e2ca29751bbf4ce185f2b5766510334363c4293.zip | |
Tools
Diffstat (limited to 'challenge-001')
| -rw-r--r-- | challenge-001/paulo-custodio/go.pl | 20 | ||||
| -rw-r--r-- | challenge-001/paulo-custodio/untabify.pl | 1 |
2 files changed, 4 insertions, 17 deletions
diff --git a/challenge-001/paulo-custodio/go.pl b/challenge-001/paulo-custodio/go.pl index 5278fa551b..3904778b45 100644 --- a/challenge-001/paulo-custodio/go.pl +++ b/challenge-001/paulo-custodio/go.pl @@ -7,25 +7,11 @@ use Path::Tiny; or die "Usage: ",path($0)->basename," nr\n"; my $nr = sprintf("%03d", $ARGV[0]); -#for my $dir (qw( -# ada -# awk -# basic -# bc -# brainfuck -# c -# cpp -# d -# forth -# fortran -# lua -# pascal -# perl -# python -# t -# )) { +path("challenge-$nr/paulo-custodio")->mkpath; +#for my $dir (qw(ada awk basic bc brainfuck c cpp d forth fortran lua pascal perl python t)) { # path("challenge-$nr/paulo-custodio/$dir")->mkpath; #} + path("challenge-$nr/paulo-custodio/README")->spew("Solution by Paulo Custodio\n"); if (! -f "challenge-$nr/paulo-custodio/Makefile") { path("challenge-$nr/paulo-custodio/Makefile")->spew( diff --git a/challenge-001/paulo-custodio/untabify.pl b/challenge-001/paulo-custodio/untabify.pl index 9f3c5657d4..dfdd1f1143 100644 --- a/challenge-001/paulo-custodio/untabify.pl +++ b/challenge-001/paulo-custodio/untabify.pl @@ -10,6 +10,7 @@ for my $dir (<challenge-*/paulo-custodio>) { my $iter = path($dir)->iterator({recurse=>1}); while (defined(my $path = $iter->())) { next unless $path->is_file; + next unless -T $path; next if $path =~ /~$/; # temp files my $ext = ""; $path->basename =~ /(\.\w+)$/ and $ext = $1; next if $ext eq "" || $ext =~ /\.(exe|o|obj|ali|ads)$/; # binaries |
