in reply to Help with strict
I'm not entirely sure what the problem is, but you could improve your datastructure and get your is_master() sub a lot shorter (or even ditch it entirely). Instead of an array, put your bot masters in a hash:
my %masters = ( John => 1, Paul => 1, George => 1, Ringo => 1, );
And then replace all calls to is_master() with exists $masters{$name}.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
:(){ :|:&};:
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Help with strict
by DaWolf (Curate) on Oct 28, 2003 at 19:12 UTC |