monoxide has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to print out a list of <option>'s from an hash of array references, but i keep getting the array reference instead of the elements of the array. Here is my code,
The output from this code is;my @columns = ( "Gender" ); my %dataoptions = ( "Gender", ["Male", "Female"] ); for ($i = 0; $i < @columns; $i++) { print $columns[$i].': '; foreach $option ($dataoptions{$columns[$i]}) { print '<input type="radio" name="'.$columns[$i].'" value="'.$optio +n.'"> '.$option.' '; } }
Can anyone help me out here? Thanks.Gender: <input type="radio" name="Gender" value="ARRAY(0x1bba2e4)"> AR +RAY(0x1bba2e4)
Back to
Seekers of Perl Wisdom