One problem may be that your data is INconsistent. Note the doubled "&" in 3 after the date.
More generally, this looks like a case where you might profitably use a different regex to capture the just the date (eg m%\d&(\d{8})&% ) and a hash, keyed on the date, with the full string as a value. Once you have it in the proposed hash, sorting comes easy...
In reply to Re: How to sort data in the input file ?
by ww
in thread How to sort data in the input file ?
by bh_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |