use strict; use warnings; use RTF::Writer; my %authors = ( "Isheng J. Tsai" => "1,2", "Magdalena Zarowiecki" => "1", "Nick Riddiford" => "14,15", ); my $rtf = RTF::Writer->new_to_file( "super.rtf" ); $rtf->prolog( title => "Authors" ); $rtf->paragraph( \'', "The authors:" ); for my $a (sort keys %authors) { $rtf->print( \'\plain', "$a" ); $rtf->print( \'\super', $authors{$a} ); $rtf->print( \'\plain', "," ); } $rtf->close;