sub FormatThis{ my %h = @_; foreach (keys %h){ $objSelection->Font->{Bold} = 1; $objSelection->TypeText($_); $objSelection->Font->{Bold} = 0; $objSelection->TypeText('' . $h{$_}); $objSelection->TypeParagraph(); } } ########################## # Now you can call it like this ... FormatThis( 'ARP Always Source Route: ' => $objItem->ArpAlwaysSourceRoute, 'ARP Use EtherSNAP: ' => $objItem->ArpUseEtherSNAP, ); # Etc... }