diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2019-10-01 15:03:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-01 15:03:34 +0100 |
| commit | f87c85cc854ffeb02eff8404f999837c7db0b751 (patch) | |
| tree | 10eafe31da343c64944a377483a8720cdc91485e | |
| parent | e9a8e911af3c026dca27ca0e41616022614aec96 (diff) | |
| parent | 7ac647c3bfa545bbb41bd49a0ce9cf3ab34fb82b (diff) | |
| download | perlweeklychallenge-club-f87c85cc854ffeb02eff8404f999837c7db0b751.tar.gz perlweeklychallenge-club-f87c85cc854ffeb02eff8404f999837c7db0b751.tar.bz2 perlweeklychallenge-club-f87c85cc854ffeb02eff8404f999837c7db0b751.zip | |
Merge pull request #698 from davorg/master
Challenge 28 - Dave Cross
| -rw-r--r-- | challenge-028/dave-cross/perl5/ch-1.pl | 19 | ||||
| -rw-r--r-- | challenge-028/dave-cross/perl5/ch-2.pl | 13 |
2 files changed, 32 insertions, 0 deletions
diff --git a/challenge-028/dave-cross/perl5/ch-1.pl b/challenge-028/dave-cross/perl5/ch-1.pl new file mode 100644 index 0000000000..5ae77b6180 --- /dev/null +++ b/challenge-028/dave-cross/perl5/ch-1.pl @@ -0,0 +1,19 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use feature 'say'; + +use File::Basename; + +@ARGV or die 'Usage: ', basename($0), " [list of filenames]\n"; + +for (@ARGV) { + if (-T) { + say "$_ looks like a text file"; + } elsif (-B) { + say "$_ looks like a binary file"; + } else { + say "$_ looks a bit weird"; + } +} diff --git a/challenge-028/dave-cross/perl5/ch-2.pl b/challenge-028/dave-cross/perl5/ch-2.pl new file mode 100644 index 0000000000..f9b2c5789e --- /dev/null +++ b/challenge-028/dave-cross/perl5/ch-2.pl @@ -0,0 +1,13 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use Time::Piece; + +STDOUT->autoflush(1); + +while (1) { + print localtime->strftime('%H:%M:%S'); + sleep 1; + print "\b\b\b\b\b\b\b\b"; +} |
