in reply to Global vars not accessable globaly

You seem to have an issue with array usage. This code is suspect:

$response=($s->var_bind_list->{$_}); @final1 = $response; $response2 = ($s->var_bind_list->{$_}); @final2 = $response2;
I assume the right hand side of each expression returns a list of values. When you assign those lists to the scalars $response and $response2, the scalars get the last element of each list on the right.