------ art_4541_13929539.1166545514620 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Check out the doucmentation on gets method with: ri Kernel#gets On 12/19/06, Alex Ciarlillo <ac251404 / ohio.edu> wrote: > > For some reason when using command line arguments to specify input > files, whenever I use 'gets' it seems to be reading from the argument > files instead of STDIN. > > My code is something like this (simplified): > > <code> > > emp_file RGV[0] > inp_file RGV[1] > out_file RGV[2] > > print "Please enter the first date of the pay period (MM/DD/YYYY): " > date ets > puts date > exit > > </code> > > Now instead of allowing me to type a response it is just spitting out > the first line of the file that is given by ARGV[0]. In this case the > file is a list of 3 digit numbers and just spits out "###\n" and exits > without allowing me to type anything. Any ideas on why this is > happening? Do I need to clear 'gets' or something? > Thanks > > -- > Posted via http://www.ruby-forum.com/. > > ------ art_4541_13929539.1166545514620--