in reply to Uninitialised value in list assignment
Contrary to the assertions made by some of the other posters so far, split does NOT return the number of arguments specified by the third argument if there are less items than is specified, NOR does a warning get raised when you assign undef to a variable using list assignment, nor is it an error to do so with mismatched elements on either side. In fact this warning only has the remotest connection to the split or list assignment. The problem is that %ENV is a tied variable. Try the code with a lexically declared %ENV and the warnings go away.
|
|---|