in reply to regex question
while (<FILE>) { if ( $. % 2 ) { $gref = (split /\|/, $_)[0]; } else { $type = (split /,/, $_)[0]; } } [download]