From: Chad Perrin Date: 2007-04-16T13:17:19+09:00 Subject: Re: translate Perl diamond operator to Ruby On Mon, Apr 16, 2007 at 12:18:12PM +0900, James Edward Gray II wrote: > On Apr 15, 2007, at 5:07 PM, Chad Perrin wrote: > > >On Mon, Apr 16, 2007 at 05:27:24AM +0900, Benjohn Barnes wrote: > >> > >>What _is_ ARGF? I've printed it's class, but apparently it is: > >> > >>>irb(main):003:0> ARGF.class > >>>=> Object > >> > >>... an Object. > >> > > > >Now that I know ARGF exists . . . > > > >http://www.danvk.org/wp/?m=200701 reports the following: > > > > ARGF is a great crutch for Perl programmers who miss typing while > >(<>) > > {...}. It opens each input file left in ARGV and yields each > >line. If > > there?s no input files left, it reads STDIN and yields each line it > > gets there. Many, many programs do their work in an ARGF loop. > > I don't much care for that description. ARGF simplifies the > implementation of some very common behavior for command-line > programs. I don't feel it exists merely as a crutch for Perl > programmers. Nor do I. I found the more implementation-related description to be somewhat useful, however, once I got past the opining. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] "It's just incredible that a trillion-synapse computer could actually spend Saturday afternoon watching a football game." - Marvin Minsky