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
    Hmmm not a solution, but a cool idea.

    Thanks, hardburn, I'll try that.

    BTW, the only problem is that doesn't solve my strict handicap and I wanna be a nice Perl programmer and not the evil one I've used to be *lol*

    my ($author_nickname, $author_email) = ("DaWolf","erabbott\@terra.com.br") if ($author_name eq "Er Galvão Abbott");