http://www.perlmonks.org?node_id=128914


in reply to C to Java string conversion script

This does the same thing, but with map and join rather than foreach and .= s/"(.+)"/'{' . join(',', map "(byte)'$_'", split m!!, $1) . '}'/e;