my $total = 10; my $counter = 3; my $average = ($total/$counter); print Output_file "$average\n"; #do something here