in reply to Mistakenly Believing split is using @_
which would automatically assign the contents to @_. Maybe the warning should say Implicitly assigning result of split() to @_ is deprecated. I got burned on that one once upon a time, myself.split;
The reason the second snippet doesn't warn is that you have assigned the result to @chars. I think it's safe to say that the newer behavior is a Good Thing.
As to why the warning doesn't understand that you are still using the results in another context is a little puzzling, something that merlyn can probably answer.
MM
Update: void context =~ scalar context, got it. Thanks japhy!
|
|---|