I was going to be following patterns in the Perl Cookbook to do this, but I've changed my mind and I'm going to do it following the Python Cookbook instead. That being the case I'm starting again with #1.1 which is processing a string one character at a time.
The following code iterates over the characters in a string and writes their uppercase equivalent to the Transcript window. This recipe is written for Dolphin Smalltalk.
| aString |
aString := 'This is a string'.
aString do: [:char | Transcript show: char asUppercase ].
Tags: Smalltalk Cookbook