abachus has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Reordering array contents alphanumerically

Replies are listed 'Best First'.
Re: Reordering array contents alphanumerically
by ikegami (Patriarch) on Jan 29, 2007 at 17:56 UTC

    There is the sort command.

    my @unsorted = sort @sorted;

    and its quite large

    If the left-hand size and right-hand side of sort is the same array, I heard the sort is done in-place.

    @array = sort @array;
Re: Reordering array contents alphanumerically
by ww (Archbishop) on Jan 29, 2007 at 17:57 UTC
    Welcome to the Monastery.

    But, please, SEARCH before reposting elementary questions   26 Jun 2001; numerous others will be found if one adds "sort" to a search for "alphanumeric").

    That leaves those with answers more time to assist with not_quite_so_elementary questions.
Re: Reordering array contents alphanumerically
by perrin (Chancellor) on Jan 29, 2007 at 19:03 UTC

      You're right, its elementary. I'd forgot sort() existed. And i should have read the faq. I'm constantly amazed by my own laziness and stupidity :)

      thanks though, my question has been answered !
        You can list your simple knowledge about Perl. It would take a few minutes initially, but you would be very productive comparatively. You will be amazed by your productivity.
        Alphanumerical sorting actually puts numbers first and alphabetic characters latter.
        --Artist