in reply to Interesting Use of Grep
because I can turn the name of the hash into what is in effect an inline comment about how I am thinking. (Note that comments embedded within your code like this are more likely to be maintained than comments insert into code.)if ($is_wanted{$my_variable_here}) { # Do something }
In fact I like it enough to sometimes do that even when I know that building the hash is going to be slower.
|
|---|