polymake should already be the correct answer to this . Do you want a list of pairs of vertices or a list of pairs of indices? The first can e.g. be solved by $c=new Polytope(POINTS=>[[1,0,0],[1,2,0],[1,2,1],[1,2,2],[1,0,2]]); $a=new Set<Set<Vector>>; foreach $e (@{$c->GRAPH->EDGES}) { $a+=new Set<V...