#!/usr/bin/perl -w use strict; print jc('anStr'); sub jc { my ($c_str) = shift; return '{'.join(',',(map {"(byte)'$_'"} (split(//, $c_str)))).'}'; }