From: Gordon Thiesfeld Date: 2008-03-26T07:11:58+09:00 Subject: Re: golf: tabs to bullets Similar to Joel's approach... #bullets.rb h={} %w(\ * - o x).each_with_index{|b, i| h["\t" * i]= " " * i + "#{b} " } puts gets.gsub(/^(\t*)/){ h[$1]} until $stdin.eof? C:\ruby\scripts\>cat input_file | ruby bullets.rb foo * bar - baz o hello - world