$count+=1; if ($$hashRecordPtr{"price_product$count"} ne "" ) { print ""; if ($$hashRecordPtr{"connection${count}_description!} ne "") { print<<"CONNECTION1"; $$hashRecordPtr{"connection${count}_size${count}"} CONNECTION1 } # etc... }