From: Dossy Date: 2002-07-23T04:05:34+09:00 Subject: Re: piping into ruby at command line On 2002.07.23, David Alan Black wrote: > > OK, after some mystification, I figured out what's happening. > > The shell is interpolating its own $_ -- which is nothing. > > So what you're really getting is just "print" and "puts". > > print uses $_ (the Ruby one) by default. puts doesn't. > > Try putting the inline script in single quotes instead of double, or > escape the $ with a \ . Right. I figured that out right after I wrote the email as I was smoking my cigarette before my 2:00 PM meeting. I would have replied to my own email if I weren't sitting in the meeting ... I normally always use single quotes when typing code -- this time I used double quotes because I was cutting and pasting what the OP wrote. Defeated by my own laziness ... ouch. -- Dossy -- Dossy Shiobara mail: dossy@panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)