On 26 Jul 2000, Dave Thomas wrote: > Hugh Sasse Staff Elec Eng <hgs / dmu.ac.uk> writes: > > > How do the getopt libraries interact with ARGF? I know they can remove > > things from ARGV, but will this mean that ARGF is affected at the same > > time? I'm not sure from the information I have found. > > ARGF used ARGV whenever it needs to: it is evaluated lazily. What this I think that answeres my question. So, when I fiddle with ARGV, the next time I look at ARGF it will adjust itself accordingly. That is better than I had hoped, because I suspected it would be the first time I used it which would set it up. > means is that whenever you do a gets, ARGF says "do I have a file to I'm using readlines, but I suppose the same thing applies. > read from?" If not, it picks the next thing off ARGV and uses it. For > example, here's som code that skips a file in the middle of ARGV. [lots of examples trimmed.] > Hope this helps. Yes, thank you. > > > Dave > > Hugh hgs / dmu.ac.uk