hrothgar10 has asked for the wisdom of the Perl Monks concerning the following question:

I am a freelance archaeological researcher. My brother wrote me a small program in perl which runs very simple statistics on a file of cemetery data and produces a new output file of charts written in HTML. I would like to run new data files through it, but can't work out how to make the program process new data. (My brother has now gone off travelling). If this is not the right place to ask such a question, can some one suggest some where else I might try? I could pay a small honorarium for work done.
  • Comment on help with processing some archaeological data needed

Replies are listed 'Best First'.
Re: help with processing some archaeological data needed
by davidrw (Prior) on Jul 04, 2005 at 20:32 UTC
    i think most people here answer questions for fun ;) Can you post the script and how you currently run it? From that, it's probably a quick instruction or a minor code tweak to make it work with any file (assuming the data files are the same format).
Re: help with processing some archaeological data needed
by GrandFather (Saint) on Jul 04, 2005 at 20:29 UTC

    If somewhere in the program there is a line containing __DATA__ or __END__ with stuff following it that looks like it may be your data, simply replace the data looking stuff with new data in the same format.

    Alternatively, if the program is small, you could probably post it here and the monks will help you with it. If you do post it here make sure you have read the Writeup Formatting Tips section, particuarly the <code></code> and <readmore></readmore> bits.


    Perl is Huffman encoded by design.
      Hey! Thanks very much for your replies. From reading all three responses I worked out that the program was taking data files from a folder named data - so I moved what was in there and put in a new data file. After a few attempts trying out your ideas, I got the program to work and produce an output file that looked sensible to me. I never thought I would be able to sort this out - your help made all the difference. I am very happy - thanks again!
Re: help with processing some archaeological data needed
by grinder (Bishop) on Jul 05, 2005 at 05:51 UTC

    A program like this would usually be run from the command line, and you would specify the input data files as arguments. Take the script and copy it into a new, clean, empty directory. Copy a new data file into the same directory.

    Run the following command:

      perl progname datafile.1

    Where progname is the name of the program your brother wrote, and datafile.1 is the file to be processed. When the progrom finishes, take a look at the directory and see if any new files have been created. Copy them over to your web space and you're done. You will probably be able to process all the files in one run, by doing something like.

      perl progname data*.*

    If you're still stuck, you can paste the program into hrothgar10's scratchpad (just copy+paste into the public scratchpad field) and post a follow-up here saying you have done so.

    • another intruder with the mooring in the heart of the Perl