my %BFPRCONS = ( filename => 'whatever_the_name_is', count => 0, start => qr|===== summary blah ===|, end => qr|===== end blah ===|, ); # then you could inc the count like so: $BFPRCONS{'count'}++; # you could set the file name like so: $BFPRCONS{'filename'} = join ('_',$job,$junk1,$etc);