You can create a reference to an anonymous hash with braces {}.
You can do that outside the function call as well. That would let you use the array of field names in the label hash definition.$query->checkbox_group( # . . . -labels => { map { $_ => ucfirst } qw/eenie meenie minie moe/} );
After Compline,
Zaxo
In reply to Re: CGI & Creating an associative array dynamically
by Zaxo
in thread CGI & Creating an associative array dynamically
by meetn2veg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |