my %p = ( outputdir => undef, rptfmt => 'html', rptname => undef, rptfile => '', title => undef, headers => [], data => [], stdout => 0, ); .... cut ..... my $rpt = Report->new($p{title}, $p{headers}, $p{data});