[dancer-users] Trapping parameters from a dynamic list of checkboxes.

WK wanradt at gmail.com
Thu Aug 27 18:15:01 BST 2015

2015-08-27 20:05 GMT+03:00 Richard Reina <gatorreina at gmail.com>:

> That worked! Thank you very much.

Yeah, Yitzchak seems have an eagle eye!

> Interestingly though $input_hash->{ $key } appears as a hash ref
> "HASH(0xa1d2344)" which I was not able to dereference with
> %$input_hash->{key}.

When calling selectall_hashref, you end with multilevel hash-structure, like:

$hashref = {
  1 => {
    id => 1,
    name => "John",
  7 => {
    id => 7,
    name => "Mary",

So, when you need values of second level, you call like
$hashref->{1}{id} or if you need to dereference the value (hashref),
you must use curley brackets  like %{ $hashref->{1} }

> Is that okay? Or would such an un-exact way of doing it have a downside?

Yes, it is ok, because you don't need those values. You don't have to
do any assignement here, because you got what you want: certainity
that checkbox was checked.

Kõike hääd,


More information about the dancer-users mailing list