http://qs321.pair.com?node_id=268117


in reply to yet another sort issue

You should probably read up what qw is doing:

perl -MData::Dumper -e 'print Dumper([qw(1 2)]);'; $VAR1 = [ '1', '2' ];
vs.
perl -MData::Dumper -e 'print Dumper([1,2]);'; $VAR1 = [ 1, 2 ];

You are in fact comparing strings :), but that doesn't matter.
As numbers are always completly valid as string-value and the internal conversion is almost always what you want, this is maybe one if the times where DWIM instead of DWIT is biting you in the privat parts...

regards,
tomte


Hlade's Law:

If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.