
jigneshjsoni
User
Mar 4, 2009, 4:29 PM
Post #1 of 2
(326 views)
|
if (ENV{REQUEST_METHOD} eq 'POST'){ my $query = " " ; read(STDIN, $query, $ENV{CONTENT_LENGTH}) == $ENV{CONTENT_LENGTH} or return undef; push @name_value_pairs, split /&/, $query; } In this code $query is set to the value of white space. What kind of syntax is "read(STDIN, $query, $ENV{CONTENT_LENGTH})". I have never used such a syntax. Pls explain this syntax. It looks like, content body of the message is read in the $query. Does all the content (multiple lines) get read at one time only or is it read line by line and every line is split and pushed on to the @name_value_pairs ? Pls explain
|