This is precisely what a Plugins are all about - special PERL scripts designed to manipulate TWiki content in some specif way. Perhaps you are talking about a Perl script that runs outside of the context of TWiki and you want TWiki to somehow "catch" the output from the script?
-- SteveRJones - 05 May 2005