On 6/11/07, Xeno Campanoli <xcampanoli / gmail.com> wrote:
> Anthony Martinez wrote:
> > On Mon, Jun 11, 2007 at 01:51:16PM +0900, Nobuyoshi Nakada wrote:
> >> Hi,
> >>
> >> At Mon, 11 Jun 2007 11:47:01 +0900,
> >> <xeno / eskimo.com> wrote in [ruby-talk:255079]:
> >>> result=`cat mess.html`
>
> Yeah, looks like I only get the backslashes inserted when I use "p"
> instead of puts and print.  Thanks.

That's a feature.

seltzer:~/devel/bazaar/EarGTD sandal$ irb
>> a = "foo
oo"
=> "foo\noo"
>> puts a
foo
oo

p looks for the .inspect output, wheras puts uses .to_s
useful for debugging.