Go with lc.
If this hash only holds filehandles and the rest of the user info is stored elsewhere then just store lowercased nicks and look up lowercased nicks, like Juerd++ suggested.
If you really have reason not to do that, then you should use an array (or a pair of arrays) since that's more efficient to step through than a hash. However, remember that avoiding the expensive stepping through arrays to find a single value is what hashes were made for. Anyway, if you stick with that approach, do my $nick = lc shift; first so you don't need to repeatedly lowercase the nick within the loop, then use return $nick_check if $nick eq lc $nick_check; rather than a regex.
Makeshifts last the longest.
In reply to Re: Problem With Perl IRC Server
by Aristotle
in thread Problem With Perl IRC Server
by Veachian64
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |