in reply to scoping problems
I have not all answers but
- In line 13, it should be if( and not (if which causes the syntax error.
- Variables $saba and @saba are not related. This is the second error message. Do you mean $saba[$i] which refers to an element of @saba?
- The error about $i requiring explicit package might be caused by the previous errors.