James, Rob, Japhy, I am impressed, really. Thank you!
Rob, I read the perlfaq paragraph you mentioned and found that it proposes a solution which does not make use of 'exists': @blues = qw/azure cerulean teal turquoise lapis-lazuli/; %is_blue = (); for (@blues) { $is_blue{$_} = 1 } Now, I had the idea to combine your hash slice with this solution doing: @blues = qw/azure cerulean teal turquoise lapis-lazuli/; @[EMAIL PROTECTED] = 1; But since I have only a single number on the right side of the assignment function, only one hash element gets 1. Is there a way to automatically assign "1" to all elements with the hash slice notation (i.e. without using a loop)? I promise to drop the subject after this question. ;) Thanks again, Jan -- There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. - Jeremy S. Anderson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>