
737
APPENDIX C
Perl Code Examples
is appendix provides Perl equivalents of some algorithms presented in Chapter 9 as C
or Java code. While the C and Java code examples in Chapter 9 are useful for developing
your own commercial-grade soware, these Perl equivalents are helpful for internal-use
tools.
If you do not use Perl, feel free to skip this appendix. But, in the same vein, I encourage
you to explore the Perl programming language to see whether it can oer you something.
I use nothing but Perl for virtually all of my programming needs.
*
A few of these Perl code examples began their life as code courtesy of regex wizard Jerey
Friedl, author of a most excellent book entitled Mastering Regular Expressions, ird Edi-
tion (O’Reilly Media, 2006). Tom Christiansen and Nathan Torkington’s Perl Cookbook,
Second Edition (O’Reilly Media, 2003) should also be used, because it provides a wealth
of incredibly useful Perl examples.
Japanese Code Conversion
e programs presented in the following sections perform Japanese code conversion.
Note that all of them support ASCII (JIS-Roman), JIS X 0208:1997, and half-width ka-
takana (even for ISO-2022-JP encoding, which, technically, does not support half-width
katakana).
* In retrospect, I should have instead learned the Ruby programming language, if for no other reason than my
daughter’s name is Ruby.