in reply to returning data from a for() loop?

For loops don't have result values.

If you want to return an array from a loop, either accumulate it, or use a function that returns one (map, grep, split, etc.). Your scroll() routine could be better written as something like:

sub scroll { map { $_, "\n" } split('', shift) }
if you're trying to return an array that alternates between input characters and newlines, or
sub scroll { map { "$_\n" } split('', shift) }
if you're trying to return an array of strings that have successive characters from the argument ending with newlines. It wasn't clear which you wanted.

update: added clarification