|August 1999||Return to the Perl Hardware Store||Slide #7|
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 © 1999 M-J. Dominus|