if (m#([^\|]+)\|([^\|]+)$#) { $a=$1; $b=$1; } else { chomp; die "Bad line: $_\n"; }