From: Morton Goldberg Date: 2006-11-22T08:52:21+09:00 Subject: Re: Using two justifications on the same line. On Nov 21, 2006, at 7:00 AM, Shiloh Madsen wrote: > Ok, I think i understand that...however the shift function hasn't been > introduced yet. Is there another way that i COULD do it? Sure. In Ruby there are always many ways to achieve a goal. How about this? source = [ 'Chapter 1: Getting started', 'page 1', 'Chapter 2: Numbers', 'page 9', 'Chapter 3: Letters', 'page 13' ] line_width = 60 i = 0 while i < source.length chapter = source[i] page = source[i+1] puts chapter.ljust(line_width/2) + page.rjust(line_width/2) i += 2 end Regards, Morton