in reply to Checking the Ascendency/Descendency of Numeric Array of Any Size
sub isAscending{ $_[0] < $_[1] and shift() or return 0 while @_>1; return 1; }
Update: A less clumbsy formulation
sub isAscending{ ( $_[0] < $_[1] or return 0 ), shift while @_ > 1; return 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Checking the Ascendency/Descendency of Numeric Array of Any Size
by varian (Chaplain) on Mar 23, 2007 at 12:35 UTC |