use Template::Extract; use Data::Dumper; my $obj = Template::Extract->new; my $template = << 'TU'; TU my $document = <<'TY'; TY open F,'>./file.txt'; print F Dumper( $obj->run($obj->compile($template), $document) ); close F; #### $VAR1 = { 'record' => [ { 'rate' => 'A+', 'comment' => 'nice', 'url' => 'http://slashdot.org', 'title' => 'News for nerds.' }, { 'rate' => 'Z!', 'comment' => 'yeah', 'url' => 'http://microsoft.com', 'title' => 'Where do you want...' } ] };