in reply to Process string as Array
Many times if you're trying to muck with a string character by character you're probably not thinking in a perl-y manner yet (you're thinking C-ish and trying to iterate over a string rather than just using m// or s/// to do whatever in a single operation). If you're really set on doing it char by char, you want substr, split, or maybe something like Tie::CharArray.
|
|---|