in reply to Re^2: Sort big text file - byte offset - 50% there (Added code)
in thread Sort big text file - byte offset - 50% there

Sure, just after I post the message I realize what I did. It should have been.
sub unpacked { my($a_num) = unpack( 'V', substr( $a, 0, 4 )); my($b_num) = unpack( 'V', substr( $b, 0, 4 )); return $a_num <=> $b_num; };

Replies are listed 'Best First'.
Re^4: Sort big text file - byte offset - 50% there ("V"/"N")
by tye (Sage) on Aug 11, 2006 at 21:56 UTC

    Don't use "V" to pack, use "N", or else your values won't sort correctly.

    - tye