Help for this page
$bot->$method(\&GetInput, \&ShowOutput); # In your main program, you have to define sub GetInput{...}, ... # Alternatively, use anonymous subs : $bot->$method(sub{print $_[0]; return scalar <>}, sub{print $_[0] . "\n"});
sub method{ my ($self, $getInput,$SendOutput) = @_; ... $SendOutput->($output); }