in reply to Re: Sort Says "not numeric" then sorts numeric anyway?
in thread Sort Says "not numeric" then sorts numeric anyway?
you are getting the regex to pull off the digits at the start of each filename and sorting on that alone
No, that's not what Cody Pendant's regex does. His regex (/^d+/) looks for start of string, followed by at least one 'd' - no digit, that would be \d. And the way he uses it means that he makes a numerical compare on the truth value returned by the regex. The <=> forces scalar context, so the regex evaluates to true or false.
-- Hofmator
|
|---|