I have an array whose strings are flatfile db lines.
The first part of each $ looks like this: 12,456|L|etc.
It is a number followed by pipe(|)delimiters and other junk.
I am trying to sort this array by the first one or two #'s, so here is what I have:
@stupidperl = sort {($a =~ /^\d\d?/) <=>...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.