in reply to Re: Newline after every 5 periods
in thread Newline after every 5 periods

Can use the $. also. E.g., and not caring for uninitialized warnings:

perl -p056e '$_ .= ("\n")[$. % 5]'

Replies are listed 'Best First'.
Re^3: Newline after every 5 periods
by paulm2 (Initiate) on Jul 20, 2016 at 21:21 UTC

    Thanks, any suggestion how to implement rand in this statement for \n break within a range of character (.) occurrences?