in reply to Re (tilly) 1: associative array problem
in thread associative array problem
I have assigned it directly to array! & Instead of including the file and accessing it and load it in an array using loops I just directly given its values for the sake of the simulation.read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($names, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; if ($INPUT{$names}) { $INPUT{$names} = $INPUT{$names}.",".$val +ue; } else { $INPUT{$names} = $value; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 3: associative array problem
by tilly (Archbishop) on Nov 02, 2001 at 20:52 UTC |