Strict doesn't cause the warning.
If it really bothers you, you can shut the warning up by turning the warning off:
use strict; use warnings; my @x = qw( 1xxx 2xxx 300x 10xx ); @x = sort @x; print "default sort: @x\n"; no warnings 'numeric'; @x = sort {$a <=> $b} @x; print "numeric sort: @x\n";
In reply to Re: Re: Sort Says "not numeric" then sorts numeric anyway?
by jryan
in thread Sort Says "not numeric" then sorts numeric anyway?
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |