in reply to Regex/Sort Questions

However the sort is choking (not sorting numerically) since it doesn't know how to deal with numbers like 01, 02, etc.

I don't think that is the problem, it should work fine.

You are sorting by day ($3) first, then by year ($1) and finally by month ($2) - is that really what you want?

BTW use \. in regexes to match a literal dot .

Update: fixed description of sort order

Replies are listed 'Best First'.
Re^2: Regex/Sort Questions
by logie17 (Friar) on Dec 05, 2007 at 18:22 UTC
    Yes, you are absolutely correct. Thank you for seeing the error in my logic - I knew there was a simple solution (oops).

    Thanks
    s;;5776?12321=10609$d=9409:12100$xx;;s;(\d*);push @_,$1;eg;map{print chr(sqrt($_))."\n"} @_;