# give stdin a:b or hello:world or etc:etc while (){ ($a,$b) = split(/:/,$_,2); print "$a$b\n"; }