aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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