in reply to Concatenating numeric variables...

Like this, you mean? What you are trying to do is not completely clear to me from your description.
#!/usr/bin/perl -w use strict; # create some dummy data my %in; $in{"COST_1"} = 20; $in{"COST_2"} = 30; $in{"REPORTID_1"} = 3232; $in{"REPORTID_2"} = 3483; $in{"records"} = 2; my $linecounter = 1; my $records = $in{'records'}; open(FILE, ">outfile") or die "outfile: $!"; while ($linecounter <= $records) { my $thiscost = $in{"COST_$linecounter"} * 100; print FILE $in{"REPORTID_$linecounter"}, " "; print FILE $thiscost, "\n"; $linecounter++; } close FILE;
>cat outfile
3232 2000
3483 3000