Hi. Just a quick question. I'm fairly new to PERL and I just coded a small script I need for my site. Basically what it does is take input from a form and put it into a .txt file in this format;
(entry = what user input, count = how many times that input has been entered). It works fine but the problem is, it writes the file out in order of how the entrys are input.. I'd like it so the most requested entry is at the top, least requested at the bottom, such as..
A perl guru will probably have a better answer, but I suspect you are going to have open the file, read the entire file into an array, close the file handle, sort the array and then open the file for writing and print the array to the file. In effect you will be opening the file, getting all the data, erasing the file and writing a new file.