Michael Corgan wrote:
> What I'm trying to write is a script to randomly write to standard
> output questions in a file everytime I execute the script.  I seem to
> be getting these errors, though and I'm just not sure what I'm doing
> wrong.  I'm not sure what the errors are telling me.
> 
> 
        1)      You might want the files already loaded into an array.
        2)      Then you do your random select of the file
        3)      open the file to and slurp in all the data into an array.
        4)      Do a random on that second array to get the question you
want.
        5)      display that to the screen
        6)      Might want to setup some type of iteration count, so when
you go over that it will stop
                processing.  As it is now, depending on the number of files
entered and the number of records read, will be the number of times you will
do the processing.  I don't believe this is what you are really after.

        psuedo code:
        counter
        max
      while ( counter < max ) {
            pull a random file
            open random file and slurp all data into an array
            pick a random question out of the slurped file
            display question
            increment counter ( though you could do that in the while as
counter++
         }      

Wags ;)


**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to