<%@ Language = PerlScript %> Japanese Perl Integration Trick #1

Lexicon's Loan Book

Those of you visiting this page almost assuredly owe me money. You remember all those yen I lent you while you were in town? Time to pay up!

Obligatory Japanese

これは日本語です。意味ではありません。日本語だけです。 <% # People who owe me cash (or, sample hash) my %loans = { 'Vroom' => 5000, 'PsychoSpunk' => 10000, 'Azatoth' => 10000000, } # Some basic basic html templating my $table_start = ""; my $table_mid = ""; my $table_end = ""; # HERE IT IS! THE SECRET! # Wherever you call this subroutine, the yen mark will appear. # Remember that it pops up instantly, it doesn't return the string. sub yen { %> 円 <% } # The Japanese character for yen. %> <% # Here we go, actual use: for (keys %loans) { $Response->write( $table_start . $_ . $table_mid . %loans{$_} . ¥ . $table_end ); } %>