$parser->setHandlers(Start => \&start_handler, Char => \&handle_char); #### sub handle_char { my ($expat, $string) = @_; ... }