========================================================================================================================================
# Type of arg 1 to keys must be hash (not subtraction), near "data)"
File 'LC 2:MacPerl ƒ: formregistration.pl'; Line 22
foreach $var(keys(%registration-data)){The %registration-data hash should be %registration_data (with an underscore) so that perl doesn't try to interpret %registration-data as a subtraction function. I'm not sure if it's a general rule or just a stylistic preference, but you shouldn't (as far as I know) use hyphens in variable names, for this reason.
...
If you delete the final right bracket so that the above snippet reads (with the change to %registration_data included)
foreach $var(keys(%registration-data)){
if (length($registration-data{"$var"})==0){
print"<li>Your<em>$var</em>will be used to help confirm your order
Please fill in the <em>$var</em>field";}
}
print "</ul>";
}
=====================================================================
# Unmatched right bracket, at end of line
File 'LC 2:MacPerl ƒ: formregistration.pl'; Line 28
# syntax error, near "}"
====================================================================
foreach $var(keys(%registration_data)){then you'll be set.
if (length($registration_data{"$var"})==0) {
print"<li>Your <em>$var</em> will be used to help confirm your order
Please fill in the <em>$var</em> field";
}
}
print "</ul>";