Back to labs/answer key page

So, in order to change all As to Bs in $_, do this:

s/A/B/g

Without the g, it would change only the first A to a B, and leave all others untouched.

Back to labs/answer key page

-----

Emily M. Bender
Last modified: Fri Dec 8 11:59:24 2000