#!/usr/bin/perl

use strict;

open (DOTFILE, ">netstructclips.dot");

print DOTFILE "graph G {\n\toverlap=false;\n";

open (CLIPFILE, "<net-structure2.clp");
while(<CLIPFILE>){
       unless($_ =~ m/^\s*;/){
               if($_ =~ m/\(link (\w+)\s(\w+)\)/){
                       print DOTFILE "\t$1 -- $2;\n";
               }
       }
}
print DOTFILE "}\n";