http://qs1969.pair.com?node_id=314784


in reply to Re: question about forwarding variables to php from perl
in thread question about forwarding variables to php from perl

So, how do the variables that you want to pass enter the message?

For example, if there is a space between each variable and an equals sign between each value (ie. var1=var1 var2=var2 var3=var3), and they are just entered in on ine line, you'd probably want something like this:

chomp $body; # To get rid of the Carriage Return from the STDIN foreach my $temp (split(/ /,$body)) { # This will generate a loop for +each variable/value pair by splitting on spaces my @variable = split (/=/,$temp); # This splits by the equals sign + that is delimiting our values and variable names $vars{$variable[0]} = $variable[1]; # So generate a hash of the va +riable name and the variable value }
This will allow you to generate the proper hash that you need to pass.
As far as the web stuff goes, I'd better leave that to somebody else as I really haven't got a huge amount of experience with it, but it looks OK to me.