$ echo "ARNDBCEQZGHILKMFPSTWYV" | perl -MSet::IntSpan -ple ' $_=Set::IntSpan->new([map{ord}split//,$_])->run_list; s/\d+/chr$&/eg;s/,//g;$_="[$_]"'