#!/usr/local/bin/perl # new line at the end of each print, automatically $\ = "\n"; $string = "1:2:3::4"; print split(":",$string);