thx...but do you know how can sort increasingly or
decreasingly ???
I read the doc in perl.com but done find any thing about it.
thx again.
>$a and $b are built-in variables used for 'comparison criteria' during the
>sort process.
>
>The statement you have posited means that the contents of @files be sorted
>alphabetically. The sorting criterion is spelled by $a cmp $b statement.
>What this does is to return a 0 if both the candidates are alphabetically
>the same, -1 if one is alphabetically lesser than the succeeding element
and
>1 if the preceding element is alphabetically greater than the succeeding
>element.
>
>- Rex
>
>----- Original Message -----
>From: "nafiseh saberi" <[EMAIL PROTECTED]>
>To: "perl" <[EMAIL PROTECTED]>
>Sent: Monday, October 29, 2001 4:52 AM
>Subject: sort
>
>
>hi.
>what is the main work of {$a cmp $b} in this code :
>@articles = sort {$a cmp $b} @files;
>thx
>__________________________________
>Best regards ......... Nafiseh Saberi
> A bird in the hand ,is worth two in the bush.
> www.iraninfocenter.net
> www.sorna.net
>___________________________________
>
>
>
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]