However, for "natural" sorting (assuming that's what you want), I quite like Sort::Naturally's nsort function. It sorts things.... well, naturally :)
Gives...#!/usr/bin/perl use strict; use warnings; use Sort::Naturally; my @articleid=qw(b1 b2 b3 a100 a5 a8 a10 a11); print join("\n", nsort @articleid);
Cheers,a5 a8 a10 a11 a100 b1 b2
In reply to Re: How to sorting
by McDarren
in thread How to sorting
by soubalaji
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |