Hello!
In the following code:
**************************************************
#!/usr/bin/perl
use warnings;
use strict;
my @unsorted = (1, 2, 11, 24, 3, 36, 40, 4);
my @number = sort { $a <=> $b } @unsorted;
print "Numeric sort: @numbern";
**************************************************
returns 1 2 3 4 11 24 36 40
what I don't understand is how the block functions here: we did not define
$a and $b? Also I donot understand this kind of block usage.
Any comments appreciated!
cheers
v
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm0...1ave/direct/01/