in reply to Re: How to sort?
in thread How to sort?
Don't use $1 without testing whether the match succeeded or not. If you expect the match to always succeed, at least add an "or die". Failure to do so will give you a "stale" $1 when you least expect it.m/^(\d+)\s+(.*)/; push @names, [$1, $2];
|
|---|