@tenderlove Speaking as a sometime perl guy ... WHY????
I mean, looking back up Apple's wordexp.c there's a potload of bonkers regexp parsing stuff: if you're willing to accept the overhead of shelling out to perl for a single join(), why the hell don't you simply do everything in perl and save a lot of faffing about? (I know, I know, not the point, but ...)