in reply to Foreach in a 2D array
I have two suggestions - one answers your question and the other makes it easier to read that print statement.
-
This dereferences your array - it is just a way to do it without having to save it to another variable first.foreach $option (@{$dataoptions{$columns[$i]}}) -
This makes it easier to read the HTML tag.print qq(<input type="radio" name="$columns[$i]" value="$option">$opti +on);
|
---|
In Section
Seekers of Perl Wisdom