From eec8b614102867f37e76cca2821c61a41ca01641 Mon Sep 17 00:00:00 2001 From: Ysmael Ebreo Date: Tue, 1 Oct 2019 17:23:01 +0800 Subject: Added perl6 solution ch#28-1 --- challenge-028/yet-ebreo/perl6/ch-1.p6 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 challenge-028/yet-ebreo/perl6/ch-1.p6 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 -- cgit