Report.pm sub getParameter { my ($self, $id,$value) = @_; my $hash = { 'Key' => $id, 'Value' => $value }; #The idea is that I need to keep writing the values so obtained in an xml format.. }