Jan Eden wrote: > > Rob, James, > > James Edward Gray II wrote: > > > > What's wrong with exists()? I like exists() and you're going to hurt > > it's feelings. :) > > > > It has six characters which can be left out to minimize typing.
Proper Perl programmers like typing ;) And so do you given: > I finally came up with an idea of my own, just when I got up this morning: > > @[EMAIL PROTECTED] = 1 .. @blues; which is nine extra characters instead of six :) > This way each of the hash keys gets a value different from zero, so Ah! "different from": British English at last! > >if ($is_blue{$_}) > > still works. I have to say I like it, but it needs to be commented to say that the the hash values are irrelevant but need to be 'true'. If your code does anything specific it needs to have a reason. > Now it might be hard to determine which of these two is faster. Development time is many millions of times more expensive than processor time. Try to make it run faster /only/ if it's too slow; otherwise make it maintainable above everything else. > There's really more than one way to do it. Strictly, there are infinite ways. Perl is rich in that there are usually many /sensible/ ways to express a solution. Hence, I suppose, this group's enthusiasm: C, and even C++, cannot generate this level of enthusiasm. > Thanks to you all, for patience and friendliness, Thanks to you Jan. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>