Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / man / man1 / perltw.1
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "PERLTW 1"
.TH PERLTW 1 "2006-01-07" "perl v5.8.8" "Perl Programmers Reference Guide"
.SH "NAME"
perltw \- ¥¿Å餤¤å Perl «ü«n
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Åwªï¨Ó¨ì Perl ªº¤Ñ¦a!
.PP
±q 5.8.0 ª©¶}©l, Perl ¨ã³Æ¤F§¹µ½ªº Unicode (¸U°ê½X) ¤ä´©,
¤]³s±a¤ä´©¤F³\e¦h©Ô¤B»y¨t¥H¥~ªº½s½X¤è¦¡; \s-1CJK\s0 (¤¤¤éÁú) «K¬O¨ä¤¤ªº¤@³¡¥÷.
Unicode ¬O°ê»Ú©Êªº¼Ð·Ç, ¸Õ¹Ï²[»\e¥@¬É¤W©Ò¦³ªº¦r²Å: ¦è¤è¥@¬É, ªF¤è¥@¬É,
¥H¤Î¨âªÌ¶¡ªº¤@¤Á (§Æþ¤å, ±Ô§Q¨È¤å, ªü©Ô§B¤å, §Æ§B¨Ó¤å, ¦L«×¤å,
¦L¦a¦w¤å, µ¥µ¥). ¥¦¤]®e¯Ç¤F¦hºØ§@·~¨t²Î»P¥­»O (¦p \s-1PC\s0 ¤Î³Áª÷¶ð).
.PP
Perl ¥»¨­¥H Unicode ¶i¦æ¾Þ§@. ³oªí¥Ü Perl ¤º³¡ªº¦r¦ê¸ê®Æ¥i¥Î Unicode
ªí¥Ü; Perl ªº¨ç¦¡»Pºâ²Å (¨Ò¦p¥¿³Wªí¥Ü¦¡¤ñ¹ï) ¤]¯à¹ï Unicode ¶i¦æ¾Þ§@.
¦b¿é¤J¤Î¿é¥X®É, ¬°¤F³B²z¥H Unicode ¤§«eªº½s½X¤è¦¡Àx¦sªº¸ê®Æ, Perl
´£¨Ñ¤F Encode ³o­Ó¼Ò²Õ, ¥i¥HÅý§A»´©ö¦aŪ¨ú¤Î¼g¤J¦³ªº½s½X¸ê®Æ.
.PP
Encode ©µ¦ù¼Ò²Õ¤ä´©¤U¦C¥¿Å餤¤åªº½s½X¤è¦¡ ('big5' ªí¥Ü 'big5\-eten'):
.PP
.Vb 3
\& big5-eten Big5 ½s½X (§t­Ê¤Ñ©µ¦ù¦r§Î)
\& big5-hkscs Big5 + ­»´ä¥~¦r¶°, 2001 ¦~ª©
\& cp950 ¦r½X­¶ 950 (Big5 + ·L³n²K¥[ªº¦r²Å)
.Ve
.PP
Á|¨Ò¨Ó»¡, ±N Big5 ½s½XªºÀÉ®×Âন Unicode, ¯­»ÝÁä¤J¤U¦C«ü¥O:
.PP
.Vb 1
\& perl -Mencoding=big5,STDOUT,utf8 -pe1 < file.big5 > file.utf8
.Ve
.PP
Perl ¤]¤ºªþ¤F \*(L"piconv\*(R", ¤@¤ä§¹¥þ¥H Perl ¼g¦¨ªº¦r²ÅÂà´«¤u¨ãµ{¦¡, ¥Îªk¦p¤U:
.PP
.Vb 2
\& piconv -f big5 -t utf8 < file.big5 > file.utf8
\& piconv -f utf8 -t big5 < file.utf8 > file.big5
.Ve
.PP
¥t¥~, §Q¥Î encoding ¼Ò²Õ, §A¥i¥H»´©ö¼g¥X¥H¦r²Å¬°³æ¦ìªºµ{¦¡½X, ¦p¤U©Ò¥Ü:
.PP
.Vb 7
\& #!/usr/bin/env perl
\& # ±Ò°Ê big5 ¦r¦ê¸ÑªR; ¼Ð·Ç¿é¥X¤J¤Î¼Ð·Ç¿ù»~³£³]¬° big5 ½s½X
\& use encoding 'big5', STDIN => 'big5', STDOUT => 'big5';
\& print length("Àd¾m"); # 2 (Âù¤Þ¸¹ªí¥Ü¦r²Å)
\& print length('Àd¾m'); # 4 (³æ¤Þ¸¹ªí¥Ü¦ì¤¸²Õ)
\& print index("½Î½Î±Ð»£", "να"); # -1 (¤£¥]§t¦¹¤l¦r¦ê)
\& print index('½Î½Î±Ð»£', 'να'); # 1 (±q²Ä¤G­Ó¦ì¤¸²Õ¶}©l)
.Ve
.PP
¦b³Ì«á¤@¦C¨Ò¤l¸Ì, \*(L"½Î\*(R" ªº²Ä¤G­Ó¦ì¤¸²Õ»P \*(L"½Î\*(R" ªº²Ä¤@­Ó¦ì¤¸²Õµ²¦X¦¨ Big5
½Xªº \*(L"ν\*(R"; \*(L"½Î\*(R" ªº²Ä¤G­Ó¦ì¤¸²Õ«h»P \*(L"±Ð\*(R" ªº²Ä¤@­Ó¦ì¤¸²Õµ²¦X¦¨ \*(L"α\*(R".
³o¸Ñ¨M¤F¥H«e Big5 ½X¤ñ¹ï³B²z¤W±`¨£ªº°ÝÃD.
.Sh "ÃB¥~ªº¤¤¤å½s½X"
.IX Subsection "ÃB¥~ªº¤¤¤å½s½X"
¦pªG»Ý­n§ó¦hªº¤¤¤å½s½X, ¥i¥H±q \s-1CPAN\s0 (<http://www.cpan.org/>) ¤U¸ü
Encode::HanExtra ¼Ò²Õ. ¥¦¥Ø«e´£¨Ñ¤U¦C½s½X¤è¦¡:
.PP
.Vb 4
\& cccii 1980 ¦~¤å«Ø·|ªº¤¤¤å¸ê°T¥æ´«½X
\& euc-tw Unix ©µ¦ù¦r²Å¶°, ¥]§t CNS11643 ¥­­± 1-7
\& big5plus ¤¤¤å¼Æ¦ì¤Æ§Þ³N±À¼s°òª÷·|ªº Big5+
\& big5ext ¤¤¤å¼Æ¦ì¤Æ§Þ³N±À¼s°òª÷·|ªº Big5e
.Ve
.PP
¥t¥~, Encode::HanConvert ¼Ò²Õ«h´£¨Ñ¤F²ÁcÂà´«¥Îªº¨âºØ½s½X:
.PP
.Vb 2
\& big5-simp Big5 ¥¿Å餤¤å»P Unicode ²Å餤¤å¤¬Âà
\& gbk-trad GBK ²Å餤¤å»P Unicode ¥¿Å餤¤å¤¬Âà
.Ve
.PP
­Y·Q¦b \s-1GBK\s0 »P Big5 ¤§¶¡¤¬Âà, ½Ð°Ñ¦Ò¸Ó¼Ò²Õ¤ºªþªº b2g.pl »P g2b.pl ¨â¤äµ{¦¡,
©Î¦bµ{¦¡¤º¨Ï¥Î¤U¦C¼gªk:
.PP
.Vb 3
\& use Encode::HanConvert;
\& $euc_cn = big5_to_gb($big5); # ±q Big5 Âର GBK
\& $big5 = gb_to_big5($euc_cn); # ±q GBK Âର Big5
.Ve
.Sh "¶i¤@¨Bªº¸ê°T"
.IX Subsection "¶i¤@¨Bªº¸ê°T"
½Ð°Ñ¦Ò Perl ¤ºªþªº¤j¶q»¡©ú¤å¥ó (¤£©¯¥þ¬O¥Î­^¤å¼gªº), ¨Ó¾Ç²ß§ó¦hÃö©ó
Perl ªºª¾ÃÑ, ¥H¤Î Unicode ªº¨Ï¥Î¤è¦¡. ¤£¹L, ¥~³¡ªº¸ê·½¬Û·íÂ×´I:
.Sh "´£¨Ñ Perl ¸ê·½ªººô§}"
.IX Subsection "´£¨Ñ Perl ¸ê·½ªººô§}"
.IP "<http://www.perl.com/>" 4
.IX Item "<http://www.perl.com/>"
Perl ªº­º­¶ (¥Ñ¼ÚµÜ§¤½¥qºûÅ@)
.IP "<http://www.cpan.org/>" 4
.IX Item "<http://www.cpan.org/>"
Perl ºî¦X¨åÂúô (Comprehensive Perl Archive Network)
.IP "<http://lists.perl.org/>" 4
.IX Item "<http://lists.perl.org/>"
Perl ¶l»¼½×¾Â¤@Äý
.Sh "¾Ç²ß Perl ªººô§}"
.IX Subsection "¾Ç²ß Perl ªººô§}"
.IP "<http://www.oreilly.com.tw/chinese/perl/index.html>" 4
.IX Item "<http://www.oreilly.com.tw/chinese/perl/index.html>"
¥¿Å餤¤åª©ªº¼ÚµÜ§ Perl ®ÑÂÇ
.IP "<http://groups.google.com/groups?q=tw.bbs.comp.lang.perl>" 4
.IX Item "<http://groups.google.com/groups?q=tw.bbs.comp.lang.perl>"
»OÆW Perl ³s½u°Q½×°Ï (¤]´N¬O¦U¤j \s-1BBS\s0 ªº Perl ³s½uª©)
.Sh "Perl ¨Ï¥ÎªÌ¶°·|"
.IX Subsection "Perl ¨Ï¥ÎªÌ¶°·|"
.IP "<http://www.pm.org/groups/asia.shtml#Taiwan>" 4
.IX Item "<http://www.pm.org/groups/asia.shtml#Taiwan>"
»OÆW Perl ±À¼s²Õ¤@Äý
.IP "<http://irc.elixus.org/>" 4
.IX Item "<http://irc.elixus.org/>"
ÃÀ¥ß¨ó½u¤W²á¤Ñ«Ç
.Sh "Unicode ¬ÛÃöºô§}"
.IX Subsection "Unicode ¬ÛÃöºô§}"
.IP "<http://www.unicode.org/>" 4
.IX Item "<http://www.unicode.org/>"
Unicode ¾Ç³N¾Ç·| (Unicode ¼Ð·Çªº¨î©wªÌ)
.IP "<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>" 4
.IX Item "<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>"
Unix/Linux ¤Wªº \s-1UTF\-8\s0 ¤Î Unicode µª«È°Ý
.Sh "¤¤¤å¤Æ¸ê°T"
.IX Subsection "¤¤¤å¤Æ¸ê°T"
.ie n .IP "¬°¤°»ò¥s ""¥¿Å餤¤å"" ¤£¥s ""ÁcÅ餤¤å""?" 4
.el .IP "¬°¤°»ò¥s ``¥¿Å餤¤å'' ¤£¥s ``ÁcÅ餤¤å''?" 4
.IX Item "¬°¤°»ò¥s ¥¿Å餤¤å ¤£¥s ÁcÅ餤¤å?"
<http://www.csie.ntu.edu.tw/~b7506051/mozilla/faq.html#faqglossary>
.IP "¤¤¤å¤Æ³nÅéÁp·ù" 4
.IX Item "¤¤¤å¤Æ³nÅéÁp·ù"
<http://www.cpatch.org/>
.IP "Linux ³nÅ餤¤å¤Æ­p¹º" 4
.IX Item "Linux ³nÅ餤¤å¤Æ­p¹º"
<http://www.linux.org.tw/CLDP/>
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Encode, Encode::TW, encoding, perluniintro, perlunicode
.SH "AUTHORS"
.IX Header "AUTHORS"
Jarkko Hietaniemi <jhi@iki.fi>
.PP
Autrijus Tang (­ð©vº~) <autrijus@autrijus.org>