aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYsmael Ebreo <Ysmael.Ebreo@latticesemi.com>2019-10-01 17:23:01 +0800
committerYsmael Ebreo <Ysmael.Ebreo@latticesemi.com>2019-10-01 17:23:01 +0800
commiteec8b614102867f37e76cca2821c61a41ca01641 (patch)
tree5179a6bcc6061675f67f3af00f42fe536004eaa7
parent91790bfbd333ea3ef1a363fd0c31f982f0c15de1 (diff)
downloadperlweeklychallenge-club-eec8b614102867f37e76cca2821c61a41ca01641.tar.gz
perlweeklychallenge-club-eec8b614102867f37e76cca2821c61a41ca01641.tar.bz2
perlweeklychallenge-club-eec8b614102867f37e76cca2821c61a41ca01641.zip
Added perl6 solution ch#28-1
-rw-r--r--challenge-028/yet-ebreo/perl6/ch-1.p613
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-028/yet-ebreo/perl6/ch-1.p6 b/challenge-028/yet-ebreo/perl6/ch-1.p6
new file mode 100644
index 0000000000..45f2014e0f
--- /dev/null
+++ b/challenge-028/yet-ebreo/perl6/ch-1.p6
@@ -0,0 +1,13 @@
+use Data::TextOrBinary;
+
+sub MAIN (
+ *@files #= Files to check if ascii/binary
+) {
+ for @files -> $x {
+ if (is-text($x.IO)) {
+ say "[$x]: The file content is ascii.";
+ } else {
+ say "[$x]: The file content is binary.";
+ }
+ }
+} \ No newline at end of file