After spending all day messing around with a "click and initiate file download" javascript plugin and finally getting it to (to the best of my recolection) work, it obviously uses an ajax method of some type to pass along information to another script (page) which I can see, using tests, is starting the second script correctly, but, I have tried reading the information passed to it by using

read(STDIN, $Header, $ENV{'CONTENT_LENGTH'});

and

$Header = $ENV{'QUERY_STRING'};

and get no results. The only thing the author provides is a way to retrieve the data using PHP. Well, besides knowing next to nothing about PHP, and not even sure if my server is setup to read PHP, I'm stuck. I have successfully used a standard form to upload a file, so I'm not a greenhorn. Can anyone give me the perl conversion of the folowing PHP script so I can use Perl to proccess the data? ANY help would be appreciated since PHP is a little out of my scope *heh*

<?php
$tmp_file_name = $_FILES['Filedata']['tmp_name'];
$ok = move_uploaded_file($tmp_file_name, '/path_to/new_filename');
echo $ok ? "OK" : "FAIL";

I did try re-inventing the wheel...
But it kept getting stuck on the corners


In reply to PHP to Perl ? by PriNet

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.