push @{$ptr->{stack}}, $new_elem; $ptr->{stack}[7] = $new_value;