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