Hi, <br>I have a inventory that has, several fields with identical names, the value is always 1. When someone checks three fields with the same name, output is <br>Pencils: 1, 1, 1<br>I want to have the total number inserted, in this case 3 so<br>Pencils: 3<br>I realize this is creating an array but I can't seem to access the number. I've tried<br>if ($Form{$field} =~ /\d/){<br> @var = ({$field});<br> $var = @var;<br> print MAIL "$field: $var\n";<br> }else{<br> print MAIL "$field: $Form{$field}\n";<br> } <br> }<br>but it never adds it up. All the variables are decoded<br>at the beginning<br>foreach $pair (@pairs) {<br> local($name, $value) = split(/=/, $pair);<br> $name =~ tr/+/ /;<br> $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;<br> $value =~ tr/+/ /;<br> $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;<br>Is this why it won't create an array? <br>Confused.