in reply to finding the right corresponding element

In trying to understand your problem, I first downloaded the code you provided and ran it through perltidy to neaten up the indentation, so as to make it easier to follow your logic.

It is also helpful to me to execute the code in order to duplicate your problematic output (which you did not provide). However, I gave up after the 1st three compile and runtime errors. It is great that you are using the strictures, but you either are ignoring them, or the code you posted is not the same as what you are running.

Please post new code which compiles cleanly. If you get some error messages you do not understand, please post those as well. These simple steps will make it much easier for others to help you.

  • Comment on Re: finding the right corresponding element

Replies are listed 'Best First'.
Re^2: finding the right corresponding element
by steph_bow (Pilgrim) on Aug 13, 2007 at 14:36 UTC

    Dear toolic,

    I have taken into account your remarks : thanks for your advice

    the code I have updatd is exactely the same I just ran, so you can download it now safely, provided the name of the file that contains the data is "file"

    Moreover, I have indicated in my updates the messages of error / warning
      OK. That helps.

      I'm not sure why you are getting the warning on line 157. I suspect the problem may be somewhat related to your use of "tell" and "seek". I do not have much experience with these functions. It looks like you are reading the entire input file multiple times (once per time through your outer "while" loop).

      Is it really necessary to do this? Would it not be simpler and more efficient to slurp the contents of the input file into an array variable once, then use a "for" loop to process that array? Is input file size an issue?

        Thanks tooic for your quick reply

        No, the input file size is not an issue at all

        The idea was to look at each element of the first column, and for each of these elements, to browse through the whole elements of the second column

        Are you saying that @MY_ELEMNTS = <INFILE> could work ?