$line = "one:two:three:four:five:five"; my ( $one,$two) = (split(/:/,$line))[0,3]