in reply to Process string as Array

perldoc -f substr

Alternatively you can use split but if you want changes to the array to be reflected back in the string, you'll need to reform the string:

@string = split //, $string; # manipulate @string all you want $string = join '', @string;
update: BTW, I forgot to mention, if you're trying to validate your data as something generally well known, there are modules on CPAN that can probably do it for you.