<div dir="ltr"><div><div><div>That worked! Thank you very much. <br><br></div>Interestingly though $input_hash->{ $key } appears as a hash ref "HASH(0xa1d2344)" which I was not able to dereference with %$input_hash->{key}.  This doesn't bother me much because all I really need to know is that it has value -- that tells me the user checked the box for this option. <br><br></div>So, instead of looking at the actual value I was just going to do:<br><br>    # get parameter for accomp type keys<br>      foreach my $key ( keys %$Accomps ) {<br>     <br>      if ( param( $key ) ) { # paramter has value<br>          $input_hash->{ $key } = $Accomps->{ $key };<br>      <br>          # user checked this box. Enter a record into TO_DO table <br>          <br>      }<br>      }<br><br></div>Is that okay? Or would such an un-exact way of doing it have a downside?<br><div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-27 11:24 GMT-05:00 Yitzchak Scott-Thoennes <span dir="ltr"><<a href="mailto:sthoenna@gmail.com" target="_blank">sthoenna@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The symbolic reference there is $key; you are (unintentionally, I'd<br>
guess) using print's:<br>
<br>
    print FILEHANDLE LIST<br>
<br>
syntax, and it is trying to use $key as the filehandle.<br>
<br>
Maybe you meant:<br>
<br>
    print $key, $input_hash->{ $key }, "\n"<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Aug 27, 2015 at 8:42 AM, Richard Reina <<a href="mailto:gatorreina@gmail.com">gatorreina@gmail.com</a>> wrote:<br>
> Hi WK,<br>
><br>
> Thanks for the reply. Line 577 is the print statement  print $key<br>
> $input_hash->{ $key } . "\n"; In the foreach. I know I shouldn't be printing<br>
> here however, I just want to see what value comes across for for example<br>
> $input_hash->{ '13' } before I create a DB record based on that value.So I<br>
> guess I just need help figuring out how to see or get the value out of<br>
> $input_hash->{ID NUMBER}.<br>
><br>
><br>
><br>
> 2015-08-27 10:07 GMT-05:00 WK <<a href="mailto:wanradt@gmail.com">wanradt@gmail.com</a>>:<br>
>><br>
>> 2015-08-27 17:28 GMT+03:00 Richard Reina <<a href="mailto:gatorreina@gmail.com">gatorreina@gmail.com</a>>:<br>
>><br>
>> > After figuring out how to accommodate my placeholder in<br>
>> > selectall_hashref I<br>
>> > did this:<br>
>> ><br>
>> >  my $Accomps = $dbh->selectall_hashref( $q, 'ID', \%attr, $Sid );<br>
>><br>
>> If you need placeholder here, but you don't have need for any<br>
>> attributes, you may use `undef` here<br>
>><br>
>> my $Accomps = $dbh->selectall_hashref( $q, 'ID', undef, $Sid );<br>
>><br>
>> > Then as you suggested I do:<br>
>> ><br>
>> >  # get parameter for accomp type keys<br>
>> >       foreach my $key ( keys %$Accomps ) {<br>
>> >       print "Checking: " . $key . " for value.\n";<br>
>> >       if ( param( $key ) ) {<br>
>> >           $input_hash->{ $key } = $Accomps->{ $key };<br>
>> >           print $key $input_hash->{ $key } . "\n";<br>
>> >       }<br>
>> >       }<br>
>> ><br>
>> > (just printing temporarily to see if it trapped the values)<br>
>><br>
>> Here we actually don't need values of $Accomps-hashref, we just using<br>
>> it as list to check out form values, so depending of your futher<br>
>> needs, you may assign your specific value here, like, for example:<br>
>><br>
>>            $input_hash->{ $key } = 1;<br>
>><br>
>> > However, I get this error:<br>
>> ><br>
>> >  Route exception: Can't use string ("1") as a symbol ref while "strict<br>
>> > refs"<br>
>> > in use at /home/richard/Dancer2/MyApp/bin/../lib/MyApp.pm line 557.<br>
>> ><br>
>> > Any idea what I am doing wrong?<br>
>><br>
>> What is on line 577 of your MyApp.pm?<br>
>><br>
>> Wbr,<br>
>> --<br>
>> Kõike hääd,<br>
>><br>
>> Gunnar<br>
>> _______________________________________________<br>
>> dancer-users mailing list<br>
>> <a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
>> <a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> dancer-users mailing list<br>
> <a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
> <a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
><br>
_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
</div></div></blockquote></div><br></div></div></div>