Next | The Perl Hardware Store | DC.pm Version | 44 |
You have a list of things:
@experts = qw(Einstein Pauli Bohr);
You will want to check to see if something is in the list
Use a hash, not a list (of course)
%is_expert = qw(Einstein 1 Pauli 1 Bohr 1);
Those 1's are annoying.
If the list is not a literal compile-time list, you can't put them in anyway.
How can we turn a list into a hash?
Next | Copyright © 2003 M. J. Dominus |