zing has asked for the wisdom of the Perl Monks concerning the following question:
Hi guys, I have this code which takes in input in the form of triplets of vertices(see DATA)
What Im stuck with is this :: Suppose I have these points=(a,b,c,d); Then I want to find the set of triplets induced by these 4 vertices. For example for above four points the induced triplets should be:use strict; use warnings; use Data::Dumper; my @S; while (<DATA>) { push @S, [split]; } print "-----TRIPLETS-------\n"; print Dumper \@S; __DATA__ b c a a c d d e b
Whereas for vertices=(d,e,a) there isn't any triplet in the data.b c a a c d
Similarly for vertices=(b,e,d) there is a triplet (d e b) in the data(the last one).
Back to
Seekers of Perl Wisdom