in reply to Re: find unique elments and sum the corresponding values
in thread find unique elments and sum the corresponding values

Hi..many thanks for the reply, I couldn't understand the main part of the script, the while loop. However, when I exscuted the script I got this message: Global symbol "$sum_of" requires explicit package name at SortSum.Pl line 22. Execution of SortSum.Pl aborted due to compilation errors How can this be fixed? and if possible can you explain the script to me so I can learn? thanks
  • Comment on Re^2: find unique elments and sum the corresponding values

Replies are listed 'Best First'.
Re^3: find unique elments and sum the corresponding values
by GrandFather (Saint) on Feb 11, 2009 at 23:47 UTC

    You really need to spend some time reading documentation. If you haven't a copy of 'Learning Perl' you should at least read through the Getting Started with Perl section in Tutorials.


    True laziness is hard work
Re^3: find unique elments and sum the corresponding values
by linuxer (Curate) on Feb 12, 2009 at 00:03 UTC

    Don't know if you already saw my updated code. I added some comments and fixed that syntax error. Had a bad typo in the "print result" section.

      Hey linuxer, Yes I saw, studied, and used it. Thank you so much.