=encoding utf8
=head1 NAME
=begin original
perlfaq1 - General Questions About Perl
=end original
perlfaq1 - Perl ã«é¢ããä¸è¬çãªè³ªå
=head1 VERSION
version 5.021010
=head1 DESCRIPTION
=begin original
This section of the FAQ answers very general, high-level questions
about Perl.
=end original
ãã®ã»ã¯ã·ã§ã³ã§ã¯ãPerl ã«é¢ããé常ã«ä¸è¬çã§é«ã¬ãã«ã®è³ªåã«çãã¾ãã
=head2 What is Perl?
(Perlã£ã¦ãªãã§ãã?)
=begin original
Perl is a high-level programming language with an eclectic heritage
written by Larry Wall and a cast of thousands.
=end original
Perl 㯠Larry Wall ã¨æ°å¤ãååè
ã«ãã£ã¦æ¸ããããæè¡·çãªéºç£ãæã£ã
é«æ°´æºããã°ã©ãã³ã°è¨èªã§ãã
=begin original
Perl's process, file, and text manipulation facilities make it
particularly well-suited for tasks involving quick prototyping, system
utilities, software tools, system management tasks, database access,
graphical programming, networking, and web programming.
=end original
Perl ã®ããã»ã¹ããã¡ã¤ã«åã³ããã¹ãæä½æ©è½ã¯ã
ã¯ã£ãã¯ãããã¿ã¤ãã³ã°ãã·ã¹ãã ã¦ã¼ãã£ãªãã£ãã½ããã¦ã§ã¢ãã¼ã«ã
ã·ã¹ãã 管çã¿ã¹ã¯ããã¼ã¿ãã¼ã¹ã¢ã¯ã»ã¹ãã°ã©ãã£ã«ã«ããã°ã©ãã³ã°ã
ãããã¯ã¼ãã³ã°ããã㦠web ããã°ã©ãã³ã°ãå«ãã ã¿ã¹ã¯ã«
ç¹ã«é©ãããã®ã«ãªã£ã¦ãã¾ãã
=begin original
Perl derives from the ubiquitous C programming language and to a
lesser extent from sed, awk, the Unix shell, and many other tools
and languages.
=end original
Perl ã¯éå¨ããããã°ã©ãã³ã°è¨èªã§ãã C ããæ´¾çããããã¦
ããç¨ã§ã¯ãªãããã©ãã
sedãawkãUnix ã®ã·ã§ã«ããã³å¤ãã®ãã®ä»ã®ãã¼ã«ãè¨èªã«
å½±é¿ãåãã¦ãã¾ãã
=begin original
These strengths make it especially popular with web developers
and system administrators. Mathematicians, geneticists, journalists,
managers and many other people also use Perl.
=end original
ãããã®å¼·ã¿ã¯ãç¹ã« web éçºè
ã¨ã·ã¹ãã 管çè
ã«äººæ°ãåãã¦ãã¾ãã
æ°å¦è
ãéºä¼å¦è
ãã¸ã£ã¼ããªã¹ãã管çè
ããã®ä»ã®å¤ãã®äººã
ã Perl ã
å©ç¨ãã¦ãã¾ãã
=head2 Who supports Perl? Who develops it? Why is it free?
(ã ãã Perl ããµãã¼ããã¦ããã®ã§ãã? 誰ãéçºãã¦ããã®ã§ãã? ãªãããªã¼ãªã®ã§ãããã?)
=begin original
The original culture of the pre-populist Internet and the deeply-held
beliefs of Perl's author, Larry Wall, gave rise to the free and open
distribution policy of Perl. Perl is supported by its users. The
core, the standard Perl library, the optional modules, and the
documentation you're reading now were all written by volunteers.
=end original
pre-populist ãªã¤ã³ã¿ã¼ãããã®ç¬ç¹ã®æåã¨ãPerl ã®ä½è
ã§ãã Larry
Wall ã®å¼·ãä¿¡æ¡ããPerl ã®ããªã¼ã§ãªã¼ãã³ãªé
å¸æ¿çãçãããã¾ããã
Perl ã¯ãã®å©ç¨è
ã«ãã£ã¦ãµãã¼ãããã¦ãã¾ããã³ã¢ãPerl ã®æ¨æº
ã©ã¤ãã©ãªããªãã·ã§ã³ã¢ã¸ã¥ã¼ã«ãããã¦ããªããä»èªãã§ããè³æã¯
å
¨ã¦ãã©ã³ãã£ã¢ã®æã§æ¸ããã¾ããã
=begin original
The core development team (known as the Perl Porters)
are a group of highly altruistic individuals committed to
producing better software for free than you could hope to purchase for
money. You may snoop on pending developments via the
L
or read the L,
or you can subscribe to the mailing list by sending
[email protected] a subscription request
(an empty message with no subject is fine).
=end original
(Perl Porters ã¨ãã¦ç¥ããã)ã³ã¢éçºãã¼ã ã¯ããéãåºãã¦ã§ã
è³¼å
¥ãããã¨æãã¬ãã«ã®ãã®ããããããã«è¯ãã½ããã¦ã§ã¢ãç¡æã§
ä½ãåºãã®ã ã¨èªã£ã¦ãããé常ã«å©ä»çãªäººéã®éå£ã§ãã
L<ã¢ã¼ã«ã¤ã|http://www.nntp.perl.org/group/perl.perl5.porters/>
ãã延ã³å»¶ã³ã¨ãªã£ã¦ããéçºã«ã¤ãã¦ããã¾ãã£ããã
L ãèªãã ãã
ãããã¯ã[email protected] ã¸ç»é²é¡ããåºããã¨ã«
ãã£ã¦ã¡ã¤ãªã³ã°ãªã¹ãã«åå ãããã¨ãã§ãã¾ã
(ã¿ã¤ãã«ãªãã®ç©ºã¡ã¼ã«ã§ãã¾ãã¾ãã)ã
=begin original
While the GNU project includes Perl in its distributions, there's no
such thing as "GNU Perl". Perl is not produced nor maintained by the
Free Software Foundation. Perl's licensing terms are also more open
than GNU software's tend to be.
=end original
GNU ããã¸ã§ã¯ãã¯ãã®é
å¸ã»ããã« Perl ãå«ãã§ãã¾ããã"GNU Perl"
ã®ãããªãã®ã¯ããã¾ããã
Perl 㯠Free Software Foundation ã«ããä½æãä¿å®ãããã¦ã¯ãã¾ããã
Perl ã®ã©ã¤ã»ã³ã¹æ¡ä»¶ã¯ GNU ã½ããã¦ã§ã¢ã
é常åã£ã¦ãããããããã«ãªã¼ãã³ãªãã®ã¨ãªã£ã¦ãã¾ãã
=begin original
You can get commercial support of Perl if you wish, although for most
users the informal support will more than suffice. See the answer to
"Where can I buy a commercial version of Perl?" for more information.
=end original
ããªããæããªããPerl ã®åç¨ãµãã¼ããåãããã¨ãåºæ¥ã¾ã;
ããã©ãã大åã®å©ç¨è
ã«ã¨ã£ã¦ã¯ãéå
¬å¼ã®ãµãã¼ãã¯æå¾
æ°´æºä»¥ä¸ã®ãã®ã§ãããã
詳ãã㯠"Where can I buy a commercial version of Perl?"
(ã©ãã§åç¨ç Perl ãè²·ããã¨ãåºæ¥ã¾ãã?) ã®åçãåç
§ãã¦ãã ããã
=head2 Which version of Perl should I use?
(ã©ã®ãã¼ã¸ã§ã³ã® Perl ã使ãã¹ããªã®ã§ãããã?)
=begin original
(contributed by brian d foy)
=end original
(brian d foy ã«ãã£ã¦å¯è´ããã¾ãã)
=begin original
There is often a matter of opinion and taste, and there isn't any one
answer that fits everyone. In general, you want to use either the current
stable release, or the stable release immediately prior to that one.
Currently, those are perl5.18.x and perl5.16.x, respectively.
=end original
ããã¯ãã°ãã°è¦è§£ã¨å好ã®åé¡ã§ããã誰ã«ã§ãé©å¿ããä¸ã¤ã®çãã¨ãããã®ã¯
ããã¾ããã
ä¸è¬çã«ãç¾å¨ã®å®å®çãããã®ä¸ã¤åã®å®å®çã使ãããã§ãããã
ç¾å¨ã®ã¨ããããããã perl5.18.x 㨠perl5.16.x ã¨ãªãã¾ãã
=begin original
Beyond that, you have to consider several things and decide which is best
for you.
=end original
ããã¯ããã¨ãã¦ãããã¤ãã®äºæãèæ
®ãã¦ãã©ããããªãã«ã¨ã£ã¦
æè¯ã§ãããã決å®ããå¿
è¦ãããã¾ãã
=over 4
=item *
=begin original
If things aren't broken, upgrading perl may break them (or at least issue
new warnings).
=end original
ç©äºããããããªã£ã¦ããªããªããperl ãã¢ããã°ã¬ã¼ããããã¨ã§ãããããªã
(ã¾ãã¯å°ãªãã¨ãæ°ããè¦åãåºã)å¯è½æ§ãããã¾ãã
=item *
=begin original
The latest versions of perl have more bug fixes.
=end original
ææ°ãã¼ã¸ã§ã³ã® perl ã¯ããå¤ãã®ãã°ãä¿®æ£ããã¦ãã¾ãã
=item *
=begin original
The Perl community is geared toward supporting the most recent releases,
so you'll have an easier time finding help for those.
=end original
Perl ã®ã³ãã¥ããã£ã¯ææ°ãªãªã¼ã¹ã®ãµãã¼ãã«éä¸ããã®ã§ã
ãããã«å¯¾ããå©ãã¯æ©ãå¾ããã¾ãã
=item *
=begin original
Versions prior to perl5.004 had serious security problems with buffer
overflows, and in some cases have CERT advisories (for instance,
L ).
=end original
perl5.004 以åã®ãã¼ã¸ã§ã³ã«ã¯ãããã¡ãªã¼ãã¼ããã¼ã«ããé大ãª
ã»ãã¥ãªãã£åé¡ãããããã®ä¸é¨ã«ã¯ CERT ã¢ããã¤ã¶ãª (ä¾ãã°ã
L) ãããã¾ãã
=item *
=begin original
The latest versions are probably the least deployed and widely tested, so
you may want to wait a few months after their release and see what
problems others have if you are risk averse.
=end original
ææ°çã¯ãã¾ã使ããã¦ããªãã¦ååã«ãã¹ãããã¦ããªãã®ã§ã
ãããªã¹ã¯ãå«ããªããªãªã¼ã¹å¾æ°ã¶æå¾
ã£ã¦ä»ã®äººãã©ããªåé¡ã
æ±ãããã確èªãããããããã¾ããã
=item *
=begin original
The immediate, previous releases (i.e. perl5.14.x ) are usually maintained
for a while, although not at the same level as the current releases.
=end original
ç´åã®ãªãªã¼ã¹ (ã¤ã¾ã perl5.14.x ) ã¯æ®éãã°ããã®é
ã¡ã³ããã³ã¹ããã¾ãããã«ã¬ã³ããªãªã¼ã¹ã¨åãã¬ãã«ã§ã¯ããã¾ããã
=item *
=begin original
No one is actively supporting Perl 4. Ten years ago it was a dead
camel carcass (according to this document). Now it's barely a skeleton
as its whitewashed bones have fractured or eroded.
=end original
ã ããç©æ¥µçã« Perl 4 ããµãã¼ããã¦ãã¾ããã
10 å¹´åã(ãã®ææ¸ã«ããã°)ã©ã¯ãã®æ»ä½ã¨ãªãã¾ããã
ä»ã¨ãªã£ã¦ã¯ç½éª¨åãã¦ãã¾ãã
=item *
=begin original
The current leading implementation of Perl 6, Rakudo, released a "useful,
usable, 'early adopter'" distribution of Perl 6 (called Rakudo Star) in July of
2010. Please see L for more information.
=end original
ç¾å¨ã®æå°ç㪠Perl 6 å®è£
ã§ãã Rakudo ã¯ããæç¨ã§ä½¿ç¨å¯è½ã§
ãã¢ã¼ãªã¼ã¢ããã¿ãåããã® Perl 6 é
å¸ (Rakudo Star ã¨å¼ã°ãã¾ã) ã
2010 å¹´ 6 æã«ãªãªã¼ã¹ãã¾ããã
ãããªãæ
å ±ã«ã¤ãã¦ã¯ã©ãã L ãåç
§ãã¦ãã ããã
=item *
=begin original
There are really two tracks of perl development: a maintenance version
and an experimental version. The maintenance versions are stable, and
have an even number as the minor release (i.e. perl5.18.x, where 18 is the
minor release). The experimental versions may include features that
don't make it into the stable versions, and have an odd number as the
minor release (i.e. perl5.19.x, where 19 is the minor release).
=end original
å®éã® perl ã®éçºã¯ 2 ã¤ã®è·¯ç·ãããã¾ã: ã¡ã³ããã³ã¹çã¨å®é¨çã§ãã
ã¡ã³ããã³ã¹çã¯å®å®ãã¦ãã¦ããã¤ãã¼ãªãªã¼ã¹çªå·ã«å¶æ°ã使ãã¾ã
(ä¾ãã°ãperl5.18.0; 18 ããã¤ãã¼ãªãªã¼ã¹çªå·ã§ã)ã
å®é¨çã¯å®å®çã«å«ã¾ãã¦ããªãæ©è½ãå«ã¾ãã¦ãã¦ããã¤ãã¼ãªãªã¼ã¹çªå·ã«
å¥æ°ã使ãã¾ã(ä¾ãã°ãperl5.19.x; 19 ããã¤ãã¼ãªãªã¼ã¹çªå·ã§ã)ã
=back
=head2 What are Perl 4, Perl 5, or Perl 6?
(Perl 4, Perl 5, Perl 6 ã£ã¦ä½ã§ãã?)
=begin original
In short, Perl 4 is the parent to both Perl 5 and Perl 6. Perl 5 is the older
sibling, and though they are different languages, someone who knows one will
spot many similarities in the other.
=end original
çãè¨ãã¨ãPerl 4 㯠Perl 5 㨠Perl 6 åæ¹ã®è¦ªã§ãã
Perl 5 ã¯å
ã§ãéãè¨èªã§ã¯ããã¾ãããçæ¹ãç¥ã£ã¦ãã人ã¯ããçæ¹ã«ã
å¤ãã®é¡ä¼¼æ§ãè¦ã¤ããã§ãããã
=begin original
The number after Perl (i.e. the 5 after Perl 5) is the major release
of the perl interpreter as well as the version of the language. Each
major version has significant differences that earlier versions cannot
support.
=end original
"Perl" ã®å¾ãã®æ°å(ä¾ãã° "Perl 5" ã® 5)㯠perl ã¤ã³ã¿ããªã¿ã®
ã¡ã¸ã£ã¼ãªãªã¼ã¹çªå·ã§ãããè¨èªã®ãã¼ã¸ã§ã³ã§ãããã¾ãã
ã¡ã¸ã£ã¼ãã¼ã¸ã§ã³æ¯ã«ã以åã®ãã¼ã¸ã§ã³ã§ã¯å¯¾å¿ã§ããªã
大ããªéããããã¾ãã
=begin original
The current major release of Perl is Perl 5, first released in
1994. It can run scripts from the previous major release, Perl 4
(March 1991), but has significant differences.
=end original
ç¾å¨ã® Perl ã®ã¡ã¸ã£ã¼ãªãªã¼ã¹ã¯ Perl 5 ããã1994 å¹´ã«æåã«
ãªãªã¼ã¹ããã¾ããã
以åã®ã¡ã¸ã£ã¼ãªãªã¼ã¹ã§ãã Perl 4 (1991 å¹´ 3 æãªãªã¼ã¹) ã®ã¹ã¯ãªããã
åãã¾ãããé大ãªéããããã¾ãã
=begin original
Perl 6 is a reinvention of Perl, it is a language in the same lineage but
not compatible. The two are complementary, not mutually exclusive. Perl 6 is
not meant to replace Perl 5, and vice versa. See L"What is Perl 6?"> below
to find out more.
=end original
Perl 6 㯠Perl ã®åéçºã§ã; ããã¯åãä¸æã§ããäºææ§ã¯ããã¾ããã
ãã®äºã¤ã¯è£å®çã§ãããæä»çã§ã¯ããã¾ããã
Perl 6 㯠Perl 5 ã®ç½®ãæããæå³ãã¾ããããéãã¾ãçãªãã§ãã
ãããªãæ
å ±ã«ã¤ãã¦ã¯ L"What is Perl 6?"> ãåç
§ãã¦ãã ããã
=begin original
See L for a history of Perl revisions.
=end original
Perl ã®æ¹è¨ã®æ´å²ã«é¢ãã¦ã¯ L ãåç
§ãã¦ãã ããã
=head2 What is Perl 6?
(Perl 6 ã£ã¦ãªãã§ãã?)
=begin original
Perl 6 was I described as the community's rewrite of Perl 5.
Development started in 2002; syntax and design work continue to this day.
As the language has evolved, it has become clear that it is a separate
language, incompatible with Perl 5 but in the same language family.
=end original
Perl 6 㯠I<å
ã
ã¯> ã³ãã¥ããã£ã«ãã Perl 5 ã®æ¸ãç´ãã¨ããã¦ãã¾ããã
éçºã¯ 2002 å¹´ã«éå§ããã¾ãã; ææ³ã¨è¨è¨ã®ä½æ¥ã¯ç¾å¨ã§ãç¶ãã¦ãã¾ãã
è¨èªãé²åããã«ã¤ãã¦ãPerl 5 ã¨ã¯åãè¨èªãã¡ããªã§ã¯ããã¾ãã
å¥ã®äºææ§ã®ãªãè¨èªã§ãããã¨ãã¯ã£ãããã¦ãã¾ããã
=begin original
Contrary to popular belief, Perl 6 and Perl 5 peacefully coexist with one
another. Perl 6 has proven to be a fascinating source of ideas for those
using Perl 5 (the L object system is a well-known example). There is
overlap in the communities, and this overlap fosters the tradition of sharing
and borrowing that have been instrumental to Perl's success. The current
leading implementation of Perl 6 is Rakudo, and you can learn more about
it at L.
=end original
ä¸è¬ã«ä¿¡ãããã¦ãããã¨ã«åãã¦ãPerl 6 㨠Perl 5 ã¯å¹³åçã«å
±åãã¾ãã
Perl 6 㯠Perl 5 ã使ãã¨ãã®èå³æ·±ãã¢ã¤ãã¢ã®åºã¨èãããã¦ãã¾ã (L
ãªãã¸ã§ã¯ãã·ã¹ãã ã¯ããç¥ãããä¾ã§ã)ã
ã³ãã¥ããã£ã¯éãªã£ã¦ãã¦ããã®éãªã㯠Perl ã®æåã«å½¹ã ã£ãå
±æã¨åç¨ã®
ä¼çµ±ãè²ã¦ã¦ãã¾ãã
ç¾å¨ã®æå°ç㪠Perl 6 å®è£
㯠Rakudo ã§ãL ã§ããã«
å¦ã¹ã¾ãã
=begin original
If you want to learn more about Perl 6, or have a desire to help in
the crusade to make Perl a better place then read the Perl 6 developers
page at L and get involved.
=end original
Perl 6 ã«ã¤ãã¦ãã£ã¨ç¥ããããã¾ã㯠Perl ãããããå ´æã¸ã¨å°ã
ååè»ãå©ããããªããPerl 6 éçºè
ãã¼ã¸ L ã
èªãã§ãåå ãã¦ãã ããã
=begin original
"We're really serious about reinventing everything that needs reinventing."
--Larry Wall
=end original
"We're really serious about reinventing everything that needs reinventing."
--Larry Wall
=head2 How stable is Perl?
(Perl ã¯ã©ã®ãããå®å®ãã¦ããã®ã§ãããã?)
=begin original
Production releases, which incorporate bug fixes and new functionality,
are widely tested before release. Since the 5.000 release, we have
averaged about one production release per year.
=end original
ãã°ã®ãã£ãã¯ã¹ã¨æ°æ©è½ãçµã¿å
¥ããæ¬çªãªãªã¼ã¹ã¯ããªãªã¼ã¹åã«
åºããã¹ãããã¾ãã
å¹³åããã¨ã5.000 ã®ãªãªã¼ã¹ããã¯ã ãããä¸å¹´ã«ä¸åã®å²ã§
æ¬çªãªãªã¼ã¹ããã¦ãã¾ããã
=begin original
The Perl development team occasionally make changes to the
internal core of the language, but all possible efforts are made toward
backward compatibility.
=end original
Larry 㨠Perl éçºãã¼ã ã¯ææè¨èªå
é¨ã®ã³ã¢ã«å¯¾ããå¤æ´ãè¡ãã¾ããã
å¯è½ãªéãæ§çã¨ã®äºææ§ç¶æã«åªãã¦ãã¾ãã
=head2 How often are new versions of Perl released?
(ã©ã®ãããã®ãã¼ã¹ã§æ°ãããã¼ã¸ã§ã³ã® Perl ã¯ãªãªã¼ã¹ããã¾ãã?)
=begin original
Recently, the plan has been to release a new version of Perl roughly every
April, but getting the release right is more important than sticking rigidly to
a calendar date, so the release date is somewhat flexible. The historical
release dates can be viewed at L.
=end original
æè¿ã¯ãæ°ãããã¼ã¸ã§ã³ã® Perl ãããããæ¯å¹´ 4 æã«ãªãªã¼ã¹ããè¨ç»ã§ããã
æ£ãããªãªã¼ã¹ãããã¨ãã«ã¬ã³ãã¼æ¥ä»ã«å³æ ¼ã«ãã ãããããéè¦ãªã®ã§ã
ãªãªã¼ã¹æ¥ã¯ããæè»ã§ãã
æ´å²ä¸ã®ãªãªã¼ã¹æ¥ã¯ L ã§è¦ããã¾ãã
=begin original
Even numbered minor versions (5.14, 5.16, 5.18) are production versions, and
odd numbered minor versions (5.15, 5.17, 5.19) are development versions. Unless
you want to try out an experimental feature, you probably never want to install
a development version of Perl.
=end original
å¶æ°ã®ãã¤ãã¼ãã¼ã¸ã§ã³ (5.14, 5.16, 5.18) ã¯è£½åçãã¼ã¸ã§ã³ã§ã
å¶æ°ã®ãã¤ãã¼ãã¼ã¸ã§ã³ (5.15, 5.17, 5.19) ã¯éçºçãã¼ã¸ã§ã³ã§ãã
å®é¨çãªæ©è½ã試ãããã®ã§ãªããããããããã決ã㦠Perl ã®éçºçã
ã¤ã³ã¹ãã¼ã«ãããã¨ããªãæ¹ãããã§ãããã
=begin original
The Perl development team are called Perl 5 Porters, and their
organization is described at L.
The organizational rules really just boil down to one: Larry is always
right, even when he was wrong.
=end original
Perl éçºãã¼ã 㯠Perl 5 Porters ã¨å¼ã°ãããã®çµç¹ã¯
L ã«è¨è¿°ããã¦ãã¾ãã
çµç¹ã®è¦åã¯è¦ç´ããã¨ãã ä¸ã¤ã§ã: Larry ã¯å¸¸ã«æ£ããã§ã;
ãã¨ã以åã¯ééã£ã¦ãã¦ãã§ãã
=head2 Is Perl difficult to learn?
(Perl ã¯å¦ã¶ã®ãé£ããã®ã§ãããã?)
=begin original
No, Perl is easy to start L --and easy to keep learning. It looks
like most programming languages you're likely to have experience
with, so if you've ever written a C program, an awk script, a shell
script, or even a BASIC program, you're already partway there.
=end original
ããã; Perl 㯠L<å¦ã³å§ãã|http://learn.perl.org/> ã®ã容æ㧠-- ããã
å¦ã³ç¶ããã®ã容æãªã®ã§ãã
Perl ã¯ããªãã(ãã¶ã)æ
£ã親ããã§ããããã¦ãã®ããã°ã©ãã³ã°
è¨èªã®ããã«è¦ãã¾ã; ã§ããããC ããã°ã©ã ããawk ã¹ã¯ãªãããã
ã·ã§ã«ã¹ã¯ãªããããã¯ãã¾ã BASIC ã®ããã°ã©ã ã§ãããã¨æ¸ãããã¨ã
ããã®ãªããæ¢ã«ç¿å¾ã®éä¸ã«ããããã§ãã
=begin original
Most tasks only require a small subset of the Perl language. One of
the guiding mottos for Perl development is "there's more than one way
to do it" (TMTOWTDI, sometimes pronounced "tim toady"). Perl's
learning curve is therefore shallow (easy to learn) and long (there's
a whole lot you can do if you really want).
=end original
ããã¦ãã®ã¿ã¹ã¯ã¯ Perl è¨èªã®å°ããªãµãã»ãããè¦æ±ããã ãã§ãã
Perl ã®éçºã«ãããæå°çã¢ããã¼ã®ã²ã¨ã¤ã¯ãããããè¡ãããæ¹ã¯
ä¸ã¤ã§ã¯ãªãã("there's more than one way to do it)ã¨ãããã®ã§
ã(TMTOWTDIãæã
"tim toady"ã¨çºé³ããã)ã
ããæ
ãPerl ã®ç¿å¾æ²ç·ã¯æµ
ã
(å¦ã³ããã)é·ã(ããã»ãã¨ãã«æãã®ãªãã§ãããã¨ã¯å±±ã»ã©ãã)ã®ã§ãã
=begin original
Finally, because Perl is frequently (but not always, and certainly not by
definition) an interpreted language, you can write your programs and test
them without an intermediate compilation step, allowing you to experiment
and test/debug quickly and easily. This ease of experimentation flattens
the learning curve even more.
=end original
æå¾ã«ãPerl ã¯ãã°ãã°(ããã常ã«ãã§ã¯ããã¾ãã; å®ç¾©ã«ããã¾ã)
è¨ãããããã«ã¤ã³ã¿ã¼ããªã¿ã¼åè¨èªã§ã; ã¤ã¾ããããã°ã©ã ãæ¸ãããã
ä¸éã³ã³ãã¤ã«ã¹ãããã«å
¥ãããã®ã¾ã¾ãã¹ãã§ããå®é¨ãã
ãã¹ã/ãããã°ããã°ããããã¤å®¹æã«è¡ãªããããã«ãã¦ãããããã§ãã
ãã®å®é¨ã®å®¹æããããããã£ããç¿å¾æ²ç·ãå¹³ãã«ãã¾ã
=begin original
Things that make Perl easier to learn: Unix experience, almost any kind
of programming experience, an understanding of regular expressions, and
the ability to understand other people's code. If there's something you
need to do, then it's probably already been done, and a working example is
usually available for free. Don't forget Perl modules, either.
They're discussed in Part 3 of this FAQ, along with L, which is
discussed in Part 2.
=end original
Perl ãããå¦ã³ããããããã®: UNIX ã®çµé¨ãã»ã¨ãã©ãããã種é¡ã®
ããã°ã©ãã³ã°çµé¨ãæ£è¦è¡¨ç¾ã®ç解ãããã¦ä»ã®äººã®ã³ã¼ããç解ããåã
ããªããä½ãè¡ãå¿
è¦ãããå ´åããã¶ãããã¯è¡ããã¦ããã
é常ãã®ä»äºã®äºä¾ã¯ããªã¼ã§å©ç¨ãããã¨ãã§ãã¾ãã
Perl ã¢ã¸ã¥ã¼ã«ãå¿ãã¦ã¯ãªãã¾ããã
ãããã¯äºç« ã§è°è«ããã¦ãã L ã¨å
±ã«ã
ãã® FAQ ã®ä¸ç« ã§è°è«ããã¦ãã¾ãã
=head2 How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl?
(Java, Python, REXX, Scheme, Tcl ã¨ãã£ãä»ã®è¨èªã¨æ¯ã¹ã¦ Perl ã¯ã©ããªãã§ãããã?)
=begin original
Perl can be used for almost any coding problem, even ones which require
integrating specialist C code for extra speed. As with any tool it can
be used well or badly. Perl has many strengths, and a few weaknesses,
precisely which areas are good and bad is often a personal choice.
=end original
Perl ã¯ã»ã¨ãã©ããããã³ã¼ãã£ã³ã°ä¸ã®åé¡ã«ä½¿ãã¾ã; ããé«éã«ããããã®
ç¹å¥ãª C ã³ã¼ãã¨ã®çµ±åãå¿
è¦ãªãã®ãå«ã¿ã¾ãã
ãããããã¼ã«ã¨åæ§ããã使ããã¨ãæªã使ããã¨ãã§ãã¾ãã
Perl ã¯å¤ãã®å¼·ã¿ã¨ãããã¤ãã®å¼±ã¿ãããã¾ã; æ£ç¢ºã«ã¯ã©ã®åéãããã
ã©ã®åéãæªããã¯ãã°ãã°å人ã®é¸æã§ãã
=begin original
When choosing a language you should also be influenced by the
L, L
and L which surrounds it.
=end original
è¨èªãé¸ã¶ã¨ãããã®å¨ãã® L<ãªã½ã¼ã¹|http://www.cpan.org/>ã
L<ãã¹ãæå|http://www.cpantesters.org/>ã
L<ã³ãã¥ããã£|http://www.perl.org/community.html> ã®å½±é¿ãåããã¹ãã§ãã
=begin original
For comparisons to a specific language it is often best to create
a small project in both languages and compare the results, make sure
to use all the L of each language,
as a language is far more than just it's syntax.
=end original
ç¹å®ã®è¨èªã¨ã®æ¯è¼ã®ããã«ã¯ãè¨èªã¯åãªãææ³ä»¥ä¸ã®ãã®ãªã®ã§ã
両æ¹ã®è¨èªã§å°ããããã¸ã§ã¯ããä½ã£ã¦çµæãæ¯è¼ããããããã®è¨èªã§
å
¨ã¦ã® L<ãªã½ã¼ã¹|http://www.cpan.org/> ã使ãããã¨ã確èªããã®ããã°ãã°
æè¯ã®æ¹æ³ã§ãã
=head2 Can I do [task] in Perl?
(Perl ã§ââãè¡ãã¾ãã?)
=begin original
Perl is flexible and extensible enough for you to use on virtually any
task, from one-line file-processing tasks to large, elaborate systems.
=end original
Perl ã¯ããªã³ã©ã¤ã³ã®ãã¡ã¤ã«å¦çã¿ã¹ã¯ããè¤éãªã·ã¹ãã ã¾ã§ã»ã¨ãã©
å
¨ã¦ã®ã¿ã¹ã¯ã§ä½¿ãã®ã«ååãªæè»æ§ããããé«ãæ¡å¼µæ§ãæã£ã¦ãã¾ãã
=begin original
For many people, Perl serves as a great replacement for shell scripting.
For others, it serves as a convenient, high-level replacement for most of
what they'd program in low-level languages like C or C++. It's ultimately
up to you (and possibly your management) which tasks you'll use Perl
for and which you won't.
=end original
å¤ãã®äººã
ã«ã¨ã£ã¦ã¯ãPerl ã¯ã·ã§ã«ã¹ã¯ãªããã£ã³ã°ã«å¯¾ãã
å大ãªä»£ç¨åã¨ãã¦ä»ãã¾ãã
ä»ã®äººã
ã«ã¨ã£ã¦ã¯ãC ãC++ ã®ãããªä½æ°´æºè¨èªã§ããã°ã©ã ãã¦ãã
大åã®ãã®ã«å¯¾ããã便å©ã§é«æ°´æºãªä»£ç¨åã¨ãã¦ä»ãã¾ãã
æçµçã«ã¯ Perl ãã©ã®ã¿ã¹ã¯ã«ä½¿ã£ã¦ã©ãã«
使ããªããã¯ããªã(ããã¦ãã¶ãããªãã®ç®¡ç)ã«ããã¾ãã
=begin original
If you have a library that provides an API, you can make any component
of it available as just another Perl function or variable using a Perl
extension written in C or C++ and dynamically linked into your main
perl interpreter. You can also go the other direction, and write your
main program in C or C++, and then link in some Perl code on the fly,
to create a powerful application. See L.
=end original
API ãæä¾ããã©ã¤ãã©ãªãããã°ãããã«ããã³ã³ãã¼ãã³ããã¿ããªã
ã¡ããã©ããã²ã¨ã¤ã® Perl é¢æ°ã¨ãã¦ãããã㯠C ã C++ ã§æ¸ããã
主è¦ãª perl ã¤ã³ã¿ã¼ããªã¿ã«ãã¤ãããã¯ãªã³ã¯ããã Perl ã¨ã¯ã¹ãã³ã·ã§ã³ã
使ã£ãå¤æ°ã¨ãã¦ãå©ç¨ãããã¨ãã§ãã¾ãã
ã¾ããä»ã®æ¹åã«è¡ã£ã¦ãå¼·åãªã¢ããªã±ã¼ã·ã§ã³ãå¶ä½ããããã«ã
主è¦ãªããã°ã©ã ã C ã C++ ã§æ¸ãã¦ãããããã®ã¾ã¾
ã¡ãã£ã¨ãã Perl ã³ã¼ãã«ãªã³ã¯ããããã¨ãå¯è½ã§ãã
L ãåç
§ãã¦ãã ããã
=begin original
That said, there will always be small, focused, special-purpose
languages dedicated to a specific problem domain that are simply more
convenient for certain kinds of problems. Perl tries to be all things
to all people, but nothing special to anyone. Examples of specialized
languages that come to mind include prolog and matlab.
=end original
ãã種ã®åé¡ã«å¯¾ãã¦ã¯åã«ãã便å©ã§ãç¹å®ã®åé¡é åå°ç¨ã®ãå°åã§ã
éç´ããããç¹å¥ãªç®çãæã£ãè¨èªã¯å¸¸ã«ãããã®ã ã¨è¨ããã¦ãã¾ãã
Perl ã¯ãããã人ã«å¯¾ãã¦ãããããã®ã§ãããã¨ãã¦ãã¾ããã
誰ãã«å¯¾ããä½ãç¹å¥ãªãã®ã§ã¯ããã¾ããã
ç¹åããè¨èªã®ä¾ã¨ãã¦ã¯ prolog 㨠matlab ãæãæµ®ããã§ãã¾ãã
=head2 When shouldn't I program in Perl?
(Perl ã§ããã°ã©ã ããã¹ãã§ã¯ãªãã®ã¯ã©ãããå ´åã§ãã?)
=begin original
One good reason is when you already have an existing
application written in another language that's all done (and done
well), or you have an application language specifically designed for a
certain task (e.g. prolog, make).
=end original
ä»ã®è¨èªã§è¨è¿°ããã¦ãã¦ãã§ã«ä½¿ããã¦ãããããª(ããã«
ããããã¾ãåãã¦ãã)ã¢ããªã±ã¼ã·ã§ã³ãããã¨ãã
ããç¹å®ã®ã¿ã¹ã¯ã®ããã«ç¹å¥ã«ãã¶ã¤ã³ãããã¢ããªã±ã¼ã·ã§ã³è¨èª(prolog ã
make ãªã©)ãããã¨ããã®ãçç±ã«ãªãã§ãããã
=begin original
If you find that you need to speed up a specific part of a Perl
application (not something you often need) you may want to use C,
but you can access this from your Perl code with L.
=end original
(é »ç¹ã«å¿
è¦ã«ãªããã®ã§ã¯ããã¾ããã) Perl ã¢ããªã±ã¼ã·ã§ã³ã®ç¹å®ã®é¨åã
é«éåããå¿
è¦ãããå ´åãC ã使ãããããããã¾ããããPerl ã®ã³ã¼ããã
L ã使ã£ã¦ããã«ã¢ã¯ã»ã¹ã§ãã¾ãã
=head2 What's the difference between "perl" and "Perl"?
(âperlâã¨âPerlâã®éãã¯ãªãã§ãã?)
=begin original
"Perl" is the name of the language. Only the "P" is capitalized.
The name of the interpreter (the program which runs the Perl script)
is "perl" with a lowercase "p".
=end original
"Perl" ã¯è¨èªã®ååã§ãã
"P" ã ãã大æåã«ãã¾ãã
ã¤ã³ã¿ããªã¿(Perl ã¹ã¯ãªãããå®è¡ããããã°ã©ã )ã®åå㯠"perl" ã§ã;
å°æåã® "p" ã§ãã
=begin original
You may or may not choose to follow this usage. But never write "PERL",
because perl is not an acronym.
=end original
ãã®ä½¿ç¨æ³ã«å¾ã£ã¦ããã¾ãã¾ããå¾ããªãã¦ããã¾ãã¾ããã
ãã ãã"PERL" ã¨æ¸ãã¦ã¯ããã¾ãã; ãªããªããperl ã¯ä½ãã®
é åèªã§ã¯ãªãããã§ãã
=head2 What is a JAPH?
(JAPH ã£ã¦ãªãã§ãã?)
=begin original
(contributed by brian d foy)
=end original
(brian d foy ã«ãã£ã¦å¯è´ããã¾ãã)
=begin original
JAPH stands for "Just another Perl hacker,", which Randal Schwartz used
to sign email and usenet messages starting in the late 1980s. He
previously used the phrase with many subjects ("Just another x hacker,"),
so to distinguish his JAPH, he started to write them as Perl programs:
=end original
JAPH 㯠"Just another Perl hacker," ãæå³ããRandal Schwartz 1980 年代
å¾åããé»åã¡ã¼ã«ã¨ USENET ã®ã¡ãã»ã¼ã¸ã¸ã®ãµã¤ã³ã¨ãã¦ä½¿ãå§ãã¾ããã
å½¼ã¯ã¯ä»¥åå¤ãã®è©±é¡ã«ãã®ãã¬ã¼ãºã使ã£ã¦ãã("Just another x hacker,")
ã®ã§ãJAPH ãåºå¥ããããã«ãå½¼ã¯ãããã Perl ããã°ã©ã ã®ããã«
æ¸ãå§ãã¾ãã:
print "Just another Perl hacker,";
=begin original
Other people picked up on this and started to write clever or obfuscated
programs to produce the same output, spinning things quickly out of
control while still providing hours of amusement for their creators and
readers.
=end original
ä»ã®äººã
ããããåãä¸ãã¦ãåãåºåãçæããæ°ã®å©ãããã¾ãã¯
ãããã«ããããã°ã©ã ãæ¸ãå§ããäºæ
ã¯æ¥éã«å¶å¾¡ä¸è½ã¨ãªãã¾ãããã
æªã ã«ä½è
ã¨èªè
ã«ã¨ã£ã¦æ¥½ãã¿ã®æéãæä¾ãã¦ãã¾ãã
=begin original
CPAN has several JAPH programs at L.
=end original
CPAN ã«ã¯ L ã«ãããã¤ãã® JAPH ããã°ã©ã ã
ããã¾ãã
=head2 How can I convince others to use Perl?
(ä»ã®äººã«ãã©ãããã° Perl ã使ãããã«èª¬å¾ã§ããã§ãããã?)
=begin original
(contributed by brian d foy)
=end original
(brian d foy ã«ãã£ã¦å¯è´ããã¾ãã)
=begin original
Appeal to their self interest! If Perl is new (and thus scary) to them,
find something that Perl can do to solve one of their problems. That
might mean that Perl either saves them something (time, headaches, money)
or gives them something (flexibility, power, testability).
=end original
å½¼ãèªèº«ã®é¢å¿ã«è¨´ãã¦ãã ãã!
ããå½¼ãã«ã¨ã£ã¦ Perl ãæ°ãã(å¾ã£ã¦æããã) ãã®ãªãã
Perl ãå½¼ãã®åé¡ã®ã²ã¨ã¤ã解決ã§ãããããªãã¨ãä½ãã²ã¨ã¤
è¦ã¤ãã¦ãã ããã
ããã«ãã£ã¦ãPerl ãä½ã(æéãæ©ã¿ãæé)ãç¯ç´ãããã
ä½ã(æè»æ§ãåããã¹ãå¯è½æ§)ãä¸ãããã¨ãæå³ããããããã¾ããã
=begin original
In general, the benefit of a language is closely related to the skill of
the people using that language. If you or your team can be faster,
better, and stronger through Perl, you'll deliver more value. Remember,
people often respond better to what they get out of it. If you run
into resistance, figure out what those people get out of the other
choice and how Perl might satisfy that requirement.
=end original
ä¸è¬çã«ãããè¨èªã®å©ç¹ã¯ããã®è¨èªã使ã人ã
ã®ã¹ãã«ã«å¤§ããªé¢ä¿ã
ããã¾ãã
ãã Perl ã«ãã£ã¦ããªãã¯ããªãã®ãã¼ã ãããéããããè¯ãããã
å¼·ããªãããªããããªãã¯ããå¤ãã®ä¾¡å¤ãå±ãããã¨ãã§ãã¾ãã
人ã
ã¯ãã°ãã°ãããããä½ãå¾ããããã«ããããåå¿ãããã¨ã
è¦ãã¦ããã¦ãã ããã
ããæµæã«éã£ãå ´åã¯ããã®äººã
ãä»ã®é¸æè¢ããä½ãå¼ãåºãã¦ãããã
ããã¦ã©ãããã° Perl ããã®è¦æ±ãæºããããè¦ã¤ãåºãã¦ãã ããã
=begin original
You don't have to worry about finding or paying for Perl; it's freely
available and several popular operating systems come with Perl. Community
support in places such as Perlmonks ( L )
and the various Perl mailing lists ( L ) means that
you can usually get quick answers to your problems.
=end original
Perl ãæ¢ãããè²·ã£ããããå¿é
ããå¿
è¦ã¯ããã¾ãã; Perl ã¯ããªã¼ã§
å©ç¨ã§ããããã¤ãã®æåãªãªãã¬ã¼ãã£ã³ã°ã·ã¹ãã 㯠Perl ãå梱ãã¦ãã¾ãã
Perlmonks ( L ) ã®ããã«ãã¡ãã¡ã«ããã³ãã¥ããã£
ãµãã¼ãã¨ãæ§ã
㪠Perl ã¡ã¼ãªã³ã°ãªã¹ã
( L ) ã«ãã£ã¦ãããã¦ãã¯ããªãã®åé¡ã«å¯¾ããç´ æ©ã
åçãå¾ããã¾ãã
=begin original
Finally, keep in mind that Perl might not be the right tool for every
job. You're a much better advocate if your claims are reasonable and
grounded in reality. Dogmatically advocating anything tends to make
people discount your message. Be honest about possible disadvantages
to your choice of Perl since any choice has trade-offs.
=end original
æå¾ã«ãPerl ãå
¨ã¦ã®ä½æ¥ã«å¯¾ãã¦æ£ãããã¼ã«ã¨ã¯éããªããã¨ãå¿ã«
çãã¦ããã¦ãã ããã
ããªãã®ä¸»å¼µã妥å½ã§ãç¾å®ã«åºãããã®ã§ããã°ãããªãã¯é¥ãã«ãã
æå±è
ã¨ãªãã¾ãã
ãªãã§ããç¬åçãªä¸»å¼µãè¡ãã¨ã人ã
ã¯ããªãã®ä¸»å¼µãå²ãå¼ãã¦æ±ã
å¾åãããã¾ãã
å
¨ã¦ã®é¸æã«ã¯ãã¬ã¼ããªããããã¾ãã®ã§ãPerl ã¨ããé¸æã«å¯¾ãã¦
ããå¾ãå¼±ç¹ã«ã¤ãã¦ç´ ç´ã«ãªãã¾ãããã
=begin original
You might find these links useful:
=end original
以ä¸ã®ãªã³ã¯ãæç¨ããããã¾ãã:
=over 4
=item * L
=item * L
=back
=head1 AUTHOR AND COPYRIGHT
Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it
under the same terms as Perl itself.
Irrespective of its distribution, all code examples here are in the public
domain. You are permitted and encouraged to use this code and any
derivatives thereof in your own programs for fun or for profit as you
see fit. A simple comment in the code giving credit to the FAQ would
be courteous but is not required.
=begin meta
Translate: åæ 寿人
Update: SHIRAKATA Kentaro (5.6.1-5.14.1, 5.00150039)
Status: completed
=end meta