if ($totalmass != 0){@wtPercent = map{$_ / $totalmass}@wtPureAmt}else{$statustext = "You need to give me numbers!"};