STDIN is a file descriptor (file handle in Perl) that is usually connected to the keyboard input. In the case of a CGI script, HTTP POST data is fed to STDIN, so you can read it with readline or the <> operator. A much better way is to use a CGI module, such as the core CGI module.
| print pack("A25",pack("V*",map{1919242272+$_}(34481450,-49737472,6228,0,-285028276,6979,-1380265972))) |
| [reply] [d/l] [select] |
Just in case it's needed, this addendum to bv's fine reply:
No, the post data does NOT go to the command prompt. It goes to the file descriptor, STDIN, which is NOT solely a repository for data from a command prompt.
Then, if you use CGI (read perldoc CGI), you don't have to worry about the info getting to the server; your visitor's browser sends it to the file handle STDIN at the server, whence Apache or other http server programs pass it to your CGI script. The script must process the data elements thus passed and generate information for the server to act upon (generalization: pass back to the browser as a new page). | [reply] [d/l] [select] |
You sound confused about filehandles, STDIN is nothing but a Perl filehandle which is a label that describes a connection to a file, Perl has many types of filehanldes, examples are the STDIN, STDOUT, STDERR, now the way these are different has to be obvious from their context after you read about them, there're technical differences as well that got to do with buffering for instance, And you can have your own filehandles introduced too.
If you wanna learn following the right path then you might want to invest time in studying and reflecting, if you rely only on environmental impulses to motivate you you may well be laying the bricks on top of each other before they're hardened enough yet before you complete building and it'd come falling down on its weight. Anyhow here's a list that can be of use (just for starters):
NB: filehandles are customary written in uppercase.
Good Luck and Happy Perl journey.
Excellence is an Endeavor of Persistence.
Chance Favors a Prepared Mind.
| [reply] [d/l] |