in reply to Re: Re: Write to file, after manipulation
in thread Write to file, after manipulation

But then, another way is to let perl manage the dispatch table for you.
Like so:
sub BotCmd::join_channel { ... } sub BotCmd::part_channel { ... } sub BotCmd::msg_user { ... } sub BotCmd::default { ... } my %method_map = ( # cmd: method: join => 'join_channel', part => 'part_channel', msg => 'msg_user', ); sub bot_command { my $cmd = shift; my $method = $method_map{ $cmd || 'default' }; BotCmd->$method(@_); }

jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.