From: Torli Birnbauer Date: 2009-03-11T03:14:01+09:00 Subject: Re: Setting the contents of a file to a variable? Jeff Schwab wrote: > This is one of those rare moments where RTFM really does apply. Yet another defender of obfuscation and deception with fabricated gibberish, only to glorify some minuscule know-how with RTFM phrase. The code Robert wrote is Unix shell code and has nothing to do with Ruby discussion here. Besides, it should be mentioned that it is shell and on top of that if written properly for a discussion like this should look like the following: $ cat >|x < 123 > EOF cat x $ 123 and not like Robert Klemme wrote: > 17:45:12 tmp$ cat >| x < > 123 > > 456 > > EOF > 17:45:23 tmp$ cat x > 123 > 456 > 17:45:25 tmp$ allruby -e 'p File.read("x"), File.readlines("x")' > ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin] > "123\n456\n" > ["123\n", "456\n"] > ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-cygwin] > "123\n456\n" > ["123\n", "456\n"] > 17:45:55 tmp$ The intention of the above clearly is to show a sarcastic opinion of a frustrated mouse pusher, who has to bury his point in garbage to confuse the audience. I asked him to explain what he wrote and the answer to the above gibberish is very simple: Unix shell ---------- $ cat >|x < 123 > EOF cat x $ 123 -- Posted via http://www.ruby-forum.com/.