I have the following array:
my @anim = ('rn4,mm8,bosTau2,canFam2,dasNov1,echTel1',
'rn4,mm8,oryCun1,bosTau2,canFam2,dasNov1,echTel1');
It contain multiple strings, each string are comma separated. What I want to do is to sort them based on the greatest members of the string. Hence what I tried to do is this:
my @animsort = sort{scalar(split(",",$b)) <=> scalar(split(",",$a))} @anim;
But it gives this error:
Use of implicit split to @_ is deprecated at ./scripts/mycode.pl line 35
What's the correct way to do it?