$output->add_definitions ( { a => '$result = "$data"', b => '$result = "$data"', c => '$result = "HELLO WORLD!!!"' }); print $output->compute("\n"); Output : HELLO WORLD!!