in reply to Re: Search string within an predefined array
in thread Search string within an predefined array

Yes to the hash! But I would change the if to this:
if (exists $d{$dfs}) {

It's a moot point in this example since all the values are 1; but relevant if your values could be zero...