while gets; $_.chomp! z= ~/$/(z/3+1).times{|n|puts $_.scan(/.{1,#{z/(n+1)}}/)*?|} end
Hello, world.
Hello, world. Hello,| world|. Hell|o, w|orld|. Hel|lo,| wo|rld|. He|ll|o,| w|or|ld|.
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!