$_=$l="how now brown cow hay is for horses oats are for goats mary little lamb"; #maybe a little inefficient, but no temp variables, all one line ($f,$b)=(join('',(split)[0..10]), join('',(split)[11..15])); #is there a better way to compose functions? golfers? ($f,$b)=map {join('',(split(/\s+/,$l))[@$_])}([0..10],[11..15]);