Skip to content

Commit

Permalink
Fixed skipping the last word
Browse files Browse the repository at this point in the history
This would originally skip the last word in the line without printing it to the next line.
  • Loading branch information
nicqrocks committed Mar 10, 2016
1 parent 7717b27 commit 1b86ca0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions categories/tutorial/01-word-wrap.pl
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ (@in)
$length += $l.chars;
}
else {
say '';
$length = 0;
print "\n$l ";
$length = $l.chars;
}
}
say '';
Expand Down

0 comments on commit 1b86ca0

Please sign in to comment.