in reply to Is this bad coding style?

In 5.10, you can let Perl worry about when to use eq and when to use ==:
for (@array) { when ("#") {do_something()} when (1) {do_where_var_is_1()} default {do_something_else()} }
Note that your code will give a warning if the @array contains '!', or any other string that doesn't look like a number and isn't equal to '#'