Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: results from pairs combination

by moritz (Cardinal)
on Oct 01, 2008 at 17:05 UTC ( [id://714845]=note: print w/replies, xml ) Need Help??

in reply to results from pairs combination

Update: original posting changed massively in the mean time, so this is kinda out of context. In case of doubt just ignore it.

Do you always want to change the order of the last two elements? If yes

@pairs[-1, -2] = @pairs[-2, -1];

should work for you.

Replies are listed 'Best First'.
Re^2: results from pairs combination
by lipong (Initiate) on Oct 01, 2008 at 17:16 UTC
    Thanks for the quick reply The idea is not the order but each pair represents the relations between the elements so for example: @pairs=("a,b","c,b","d,f","e,b","f,g"); The results should be: "a,b","c,b","e,b" "d,f","f,g"; But the pairs can appear in any order and combination.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://714845]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-05-25 08:49 GMT
Find Nodes?
    Voting Booth?

    No recent polls found