From: Thomas Fini Hansen Date: 2004-03-13T23:40:54+09:00 Subject: Re: long string arguments On Sat, Mar 13, 2004 at 09:21:27PM +0900, Elias Athanasopoulos wrote: > Hello! > > I would like to redirect large chunks of text to a specific > resource (file, stderr, etc). I thought that the code below > would do my job: > > def |>(s) > myputs %Q|#{s} > end > > def <| > | > end Well, that doesn't work for a number of reasons. For starters it should basically quote "\nend\n...". And I don't think <| and |> are valid names... > in a similar to eruby fashion, ie: > > |> > I don't know much, but I guess > #{42} is a special number. > <| eRuby basically replace "%>anything<%" with "puts 'anything'". Everything else is left as is. > Unfortunately, I get a syntax error. Any hints? Depends on what you're trying to do. If you just want chucks of text in your code: puts <