my $fire_items; . . . while (1) { . . . #draw gunshots, possibly add new one $fire_items = handle_fire( $fire, $x, $y, $fire_items ); . . . }