Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Ha, a one liner - very clever! Well that is almost good apart from the fact that it
modifies the array. It strips the leading 0s from embedded
numeric strings, so in the exmple above a00 is
modified to a0 which is bad :-(
You can solve this by recasting it as an Shwartzian transform thus :- This also gets rid of the offensive greps! This is likely to go wrong if embedded numerics are > 232 a problem which isn't easily solvable. In my original method these numbers should be automatically upconverted to doubles by perl avoiding the problem. People who are puzzling out the above might like to consider replacing "0".pack"N",$1 with sprintf"%016d",$1 In reply to Re: (tye)Re: Sorting by_number
by ncw
|
|