From 1b86ca0e44396c4029246bbe7911a741e0b56194 Mon Sep 17 00:00:00 2001 From: Nic Date: Thu, 10 Mar 2016 09:39:21 -0500 Subject: [PATCH] Fixed skipping the last word This would originally skip the last word in the line without printing it to the next line. --- categories/tutorial/01-word-wrap.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/categories/tutorial/01-word-wrap.pl b/categories/tutorial/01-word-wrap.pl index f1fcb70..437bb62 100644 --- a/categories/tutorial/01-word-wrap.pl +++ b/categories/tutorial/01-word-wrap.pl @@ -35,8 +35,8 @@ (@in) $length += $l.chars; } else { - say ''; - $length = 0; + print "\n$l "; + $length = $l.chars; } } say '';