I have a script that I am trying to build a Web GUI front end to interface with the script.


Essentially the script takes a CSV file as input processes it and spits out several new files based on the lines frm the CSV.

My initial approach was to upload the file and then process it. This is where I am stuck. When I go to upload the file the script creates an empty file with the correct name. I used the tutorial here:

http://www.perlfect.com/articles/upload.shtml

and this one here just returns a 500 error

http://articles.sitepoint.com/article/uploading-files-cgi-perl

This leads me to my first question, is it better to upload the file then process it, or is it possible to open it on the client computer and process it server side? Since I am going to delete the CSV from the server at the end of the script anyway does it actually make sense to upload it, processit, then delete it?

Finally, I am able to get the file uploaded using php, is there a way to redirect to my perl script? The problem I run into here is I don't have a way to pass the newly uploaded filename to the script.

Any thoughts/suggestions/hints are greatly appreciated.


In reply to Local File vs Uploaded File by PyrexKidd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.