<div dir="ltr"><div>Hi WK,<br><br></div>Thanks for the reply. Line 577 is the print statement <span class="im">print $key $input_hash->{ $key } . "\n"; In the foreach. I know I shouldn't be printing here however, I just want to see what value comes across for for example </span>$input_hash->{ '13' } before I create a DB record based on that value.So I guess I just need help figuring out how to see or get the value out of $input_hash->{ID NUMBER}.<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-27 10:07 GMT-05:00 WK <span dir="ltr"><<a href="mailto:wanradt@gmail.com" target="_blank">wanradt@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">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 selectall_hashref I<br>
> did this:<br>
><br>
> my $Accomps = $dbh->selectall_hashref( $q, 'ID', \%attr, $Sid );<br>
<br>
</span>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>
<span class=""><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>
</span>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>
<span class=""><br>
> However, I get this error:<br>
><br>
> Route exception: Can't use string ("1") as a symbol ref while "strict 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>
</span>What is on line 577 of your MyApp.pm?<br>
<div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div>