#!/usr/bin/perl open(TMP,"$ARGV[0]"); while() { if($_ =~ m/([0-9-.]+)\|/) { $gref=$1; } if($_ =~ m/([0-9]+),/) { $type=$1; } }