3 ms·
I think it's a pretty weak reason to give up on a language because you were using a global variable and expecting it to automatically be treated as a local vari
by ccashell 15y ago
I think it's a pretty weak reason to give up on a language because you were using a global variable and expecting it to automatically be treated as a local variable within your function.
As others have mentioned, you are using a global variable ($_) inside a function. This is generally considered a bad practice.
The standard perl idiom of getting your function arguments via shift would make this a non-issue.