On Thu, 23 Mar 2000, ARIMA Yasuhiro wrote:

> Hi.
> 
> Hugh Sasse Staff Elec Eng <hgs / dmu.ac.uk> wrote
> 
> | Has anyone any examples of how to use ARGF or $< as I cannot find much
> | in the docs?  Thank you,
> 
> Have you read next page ?  I can find them.
> 
> http://www.ruby-lang.org/en/man-1.4/variable.html#lt
> http://www.ruby-lang.org/en/man-1.4/variable.html#argf

	Yes, but it doesn't explain how to use them.  ARGF is
	of type Object, so that is of little help.
> 
> ## In fact, I read in japanese. 
> ##   http://www.ruby-lang.org/ja/*
> ##   http://www.ruby-lang.org/ja/yasugi.pdf
> 
> #
> # cat.rb
> #
> # ruby cat.rb   file(s)
> #
> for line in ARGF
>   print line
> end
> 
	Ah, so it is an Array of lines of the concatenated input files.
	Effectively, anyway.   This was not clear from the description:
	
>> The virtual concatenation file of the files given by command line
>> arguments, or stdin (in case no
>> argument file supplied). $<.file returns the current
>> filename. (Mnemonic: $< is a shell input source.)


	thank you
	Hugh