my (@a,@b); ($a[$#a+1],$b[$#b+1]) = split /;/ while <>; print "@a\n"; print "@b\n";