There is a typo in your code. You put a semi-colon after the /;\s*/ but should have a comma instead. You also wrote $_[1] which ... I would *guess* should probably be $_->[1]. The way you've written this function and it has been interpreted is a model of obfuscation. split() called like this is in list context (contrary to someone else's assertion that it is scalar) and shouldn't pull up that warning. That perl has somehow decided to treat it as void context means that split separates the first element of the @_ array, then writes into it. The next call then splits the previous call's output and so on.
Perhaps you mean @models = map { ( split /;\s*/ )[ 1 ] } @models which is significantly more probable.
In reply to Re: deprecated split ??
by diotalevi
in thread deprecated split ??
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |