From d0464bffa29a72de61ad49381516cb4d0d772fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 31 Jul 2016 21:12:27 +0200 Subject: [PATCH 1/3] Password example: Doing just "print roll" will " "-separate these So instead let's join this up and say() it. Having a password "l i k e t h i s" is rather useless. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2279ed2..1001517 100644 --- a/README.md +++ b/README.md @@ -388,8 +388,8 @@ Generate a random 10 a-z character string Generate a random 15 ASCII Character password - perl6 -e 'print roll 15, "0".."z"' - perl6 -e 'print roll "0".."z": 15' + perl6 -e 'say roll(15, "0".."z").join("")' + perl6 -e 'say roll("0".."z": 15).join("")' Create a string of specific length From f9a01f499fc3e66675ae873ef349b90ca7413002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 31 Jul 2016 21:14:22 +0200 Subject: [PATCH 2/3] Do s/print/say in the "string of X length" example So that in a terminal this prints a newline, which is friendlier. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1001517..b1f19c2 100644 --- a/README.md +++ b/README.md @@ -393,7 +393,7 @@ Generate a random 15 ASCII Character password Create a string of specific length - perl6 -e 'print "a" x 50' + perl6 -e 'say "a" x 50' Generate and print an array of even numbers from 1 to 100 From b2fe23f499466ba580fd30e1999dd5657b416b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 31 Jul 2016 21:21:43 +0200 Subject: [PATCH 3/3] Fix an example that doesn't at all do what it says it does MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: $ echo 'hi there you' >example.txt $ perl6 -ne 'say s/(\w+){}/{$0.uc}/' example.txt 「hi」 0 => 「hi」 Now: $ perl6 -pe 's/(\w+){}/{$0.uc}/' example.txt HI there you --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b1f19c2..0c0dbda 100644 --- a/README.md +++ b/README.md @@ -451,7 +451,7 @@ Convert all text to lowercase Uppercase only the first word of each line - perl6 -ne 'say s/(\w+){}/{$0.uc}/' example.txt + perl6 -pe 's/(\w+){}/{$0.uc}/' example.txt Invert the letter case