in reply to An observation on join

If you were developing the Perl programming language, how would you write a join() function that works with a regex as separator? What would it do?

I find that it is often helpful to imagine myself being in a different role, looking at a problem from a different perspective.

Replies are listed 'Best First'.
Re^2: An observation on join
by ranga17 (Novice) on Sep 21, 2011 at 07:26 UTC
    Hey Thanks! That's much better a way to understand that than having to memorize a rule from perldoc.
Re^2: An observation on join
by limzz (Novice) on Sep 21, 2011 at 19:25 UTC

    Well put! I never bothered thinking about it, but that makes perfect sense. Using a regex for a join would be like saying "get me a food".