Title: sort array optimisation in pl/perl

Hi,

I create an array which is result of query on postgresql database and then I want to sort rows in a particular way (impossible by query on database).

My solution consists to put a rows (indice m+1) in a temporary other and then move all element before indice n to m in rows with indice n+1 to m+1 and last i put my temporary variable to indice n.

I want to know if somebody know a better solution.

I think of 2 solutions but i don't success to apply :
  - the first is to use list in which I could deplace references as a chained list
  - the second will be to deplace tab[n..m] to tab[n+1..m+1] in one instruction as ada language

Is one of this solution exists and is better than my first ? If yes, can you help me to implement ?


Best regards,

Nicolas

Reply via email to