This code:
1 #! /home/guru/bin/perl6
2
3 # Ask for some lines and output them in reverse
4 # Work out the appropriate EOF symbol for the OS
5
6 my $EOF = "CTRL-" ~ ($*DISTRO.is-win ?? "Z" !! "D");
7
8 say "Please enter some lines and end them with $EOF";
9
10 say { for reverse lines() {} };
11
12 # End
produces this:
Please enter some lines and end them with CTRL-D    # obviously from line 8
-> ;; $_? is raw { #`(Block|170303864) ... }                    # but this?

Reply via email to