> Just take <DATA> and replace that with @user_links. The code should > look like: > @user_links = ( sort { > $a->[1] <=> $b->[1] > or > $AlphaToNumber{lc($a->[2])} <=> $AlphaToNumber{lc($b->[2])} > or > $a->[3] <=> $b->[3] > } > map {[$_, /^.(\d{4})(\w{3})(\d{2})/]} > @user_links; > > The map is creating an array reference where > item 0 is Capturing the whole input line > item 1 is the (\d{4}) Capturing the year > item 2 is the (\w{3}) Capturing the month > item 3 is the (\d{2}) Capturing the day > Now as you view the sort you see the $a->[1] <=> $b->[1] which is > comparing the year then [2] is comparing the numeric month then [3] is > comparing the numeric day > > Wags ;)
To finalize the script, I need to output this data. I did the following and it works. ----begin---- (omitted opening filehandle and other prints...) foreach (@user_links) { print USER "$_->[0]"; } ----end---- Many thanks to Wags and japhy; I've really learned a lot from the both of you. I'm off the pick up 'Programming Perl' after I finish 'Learning Perl'... ry -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>