darxus: (Default)
darxus ([personal profile] darxus) wrote2009-10-07 04:28 pm
Entry tags:

Perl sort by regex.

my @sorted = sort { ($a =~ /(\d{12})/)[0] <=> ($b =~ /(\d{12})/)[0] } @lines;

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting