<div dir="ltr"><div>Thanks for all the replies.  I went with Andy's suggestion. But I will keep in mind all others.<br><br></div>Thanks again.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-05 13:32 GMT-05:00 Doug Bell <span dir="ltr"><<a href="mailto:madcityzen@gmail.com" target="_blank">madcityzen@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>For some other possibilities, see the List::Util module, which has "any" and "all".</div><div><br></div><div>use List::Util qw( any );</div><div>my $has_a_value = any { defined } values %{ $input_hash };<br><br>Though it is a core module, those functions have been added more recently, so unless you have a modern Perl, you may need to update the List::Util module from CPAN.</div><div><br>Doug Bell<div><a href="mailto:preaction@me.com" target="_blank">preaction@me.com</a></div></div><div><div class="h5"><div><br>On Aug 5, 2015, at 1:05 PM, Andy Lester <<a href="mailto:andy@petdance.com" target="_blank">andy@petdance.com</a>> wrote:<br><br></div><blockquote type="cite"><div><br><div><blockquote type="cite"><div>On Aug 5, 2015, at 1:01 PM, Richard Reina <<a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>> wrote:</div><br><div><div style="font-family:Georgia;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">my $input_hash = { <span> </span><br>      <span> </span><br>       FName => param('firstname'), <span> </span><br>       LName => param('lastname'),<br>       Email => param('email'),<br><br>   };<br>  <span> </span><br></div><span style="font-family:Georgia;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Can I check to see if any of the hash's element is defined without checking all the elements as the hash could grow in the future as the fields of the form grow.</span></div></blockquote></div><div><br></div><div>grep through the values and check their count.</div><div><br></div><div>my $number_of_defined_values = scalar grep { defined } values %{$input_hash};<br><br></div><div>
--<br>Andy Lester => <a href="http://www.petdance.com" target="_blank">www.petdance.com</a>

</div>
<br></div></blockquote></div></div><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Chicago-talk mailing list</span><br><span><a href="mailto:Chicago-talk@pm.org" target="_blank">Chicago-talk@pm.org</a></span><br><span><a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a></span></div></blockquote></div>
<br>_______________________________________________<br>
Chicago-talk mailing list<br>
<a href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/chicago-talk" rel="noreferrer" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br></blockquote></div><br></div>