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

Hello Monks, I have been trying to convert the plupload script to perl for usage in my app. I have worked in PHP but I see that a few new parts have come in since I last used it. so if any of you can help me out by showing how I can convert the following piece of php jibber jabber into nice and friendly perl, I would be very grateful.
// Read binary input stream and append it to temp file $in = fopen("php://input", "rb"); if ($in) { while ($buff = fread($in, 4096)) fwrite($out, $buff); } else die('{"jsonrpc" : "2.0", "error" : {"code": 101, "mess +age": "Failed to open input stream."}, "id" : "id"}'); fclose($in); fclose($out);
Whats this php:://input ??? and how do we do the same stuff in perl?

Replies are listed 'Best First'.
Re: Rewrite plupload in perl.
by Anonymous Monk on Mar 22, 2011 at 10:38 UTC
    Whats this php:://input ??? and how do we do the same stuff in perl?

    Seems like some kind of php question if you ask me

    See perlintro for the rest

      actually it is mixed but, I want to know how to do it in perl, so I need someone with an idea about that.
        See, you go and read perlintro, and at the same time you go and read the php documentation for fopen