Veachian64 has asked for the wisdom of the Perl Monks concerning the following question:
That way I can use the returned nickname in the correct case and everything works just fine. The problem is, this doesn't seem very efficient and I was wondering if there was a quicker way to do it.sub nick_ison { my ($nick) = @_; foreach my $nick_check (keys %fhs) { print "NICK: $nick\n"; print "NICK CHECK: $nick_check\n"; if ($nick =~ /^($nick_check)$/i) { return $nick_check } } return; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem With Perl IRC Server
by Juerd (Abbot) on Jan 26, 2002 at 21:43 UTC | |
by Veachian64 (Scribe) on Jan 26, 2002 at 23:22 UTC | |
|
Re: Problem With Perl IRC Server
by Aristotle (Chancellor) on Jan 26, 2002 at 23:46 UTC | |
|
Re: Problem With Perl IRC Server
by talexb (Chancellor) on Jan 26, 2002 at 21:51 UTC | |
by Juerd (Abbot) on Jan 26, 2002 at 23:08 UTC | |
|
Re: Problem With Perl IRC Server
by strat (Canon) on Jan 28, 2002 at 20:29 UTC | |
|
Re: Problem With Perl IRC Server
by beebware (Pilgrim) on Jan 27, 2002 at 01:44 UTC |