Just ran into a thingy where I could have used the following:

The Join() function takes a third optional (positive) number indicating the number of array elements to join (from the beginning of the array) ...

Was thinking would be nice to be able to specify a negative number, indicating that the join works from the end (or tail-end of the array), inward. Kinda like:

Code:

break on

$array = 1,2,3,4

?"val=" join($array, "-", 2) ; produces 1-2

?"val=" join($array, "-", -2) ; currently produces 1-2-3-4, maybe have it do 3-4 instead ?



Anyway - really could have used this today - I know there are ways to achieve the desired result without this, but since negative numbers in the third argument aint supported anyways, doesn't hurt to think aloud.

-Shawn