in reply to non-global $/

As others have mentioned you want to use local to limit changes to the likes of $/ within the given dynamic scope. For further information on what variables are really global, see. Can you create *real* global variables?.
HTH

_________
broquaint