[perldocjp-cvs 463] CVS update: docs/perl/5.10.0

Back to archive index

argra****@users***** argra****@users*****
2009年 7月 19日 (日) 03:19:32 JST


Index: docs/perl/5.10.0/perlopentut.pod
diff -u docs/perl/5.10.0/perlopentut.pod:1.2 docs/perl/5.10.0/perlopentut.pod:1.3
--- docs/perl/5.10.0/perlopentut.pod:1.2	Fri Jul  3 03:03:45 2009
+++ docs/perl/5.10.0/perlopentut.pod	Sun Jul 19 03:19:32 2009
@@ -1403,9 +1403,8 @@
 
 =end original
 
-One clever move with STDOUT is to explicitly close it when you're done
-with the program.
-(TBT)
+STDOUT に関する一つの利口な行動は、プログラムの終了時に
+明示的に閉じることです。
 
     END { close(STDOUT) || die "can't close stdout: $!" }
 
@@ -1417,10 +1416,8 @@
 
 =end original
 
-If you don't do this, and your program fills up the disk partition due
-to a command line redirection, it won't report the error exit with a
-failure status.
-(TBT)
+これをしないままで、このプログラムがコマンドラインリダイレクトによって
+ディスクをいっぱいにしてしまっても、失敗状態でエラー終了しません。
 
 =begin original
 
@@ -1429,9 +1426,8 @@
 
 =end original
 
-You don't have to accept the STDIN and STDOUT you were given.  You are
-welcome to reopen them if you'd like.
-(TBT)
+与えられた STDIN と STDOUT を受け入れる必要はありません。
+もし望むなら、これらを開き直せます。
 
     open(STDIN, "< datafile")
 	|| die "can't open datafile: $!";
@@ -1447,10 +1443,9 @@
 
 =end original
 
-And then these can be accessed directly or passed on to subprocesses.
-This makes it look as though the program were initially invoked
-with those redirections from the command line.
-(TBT)
+それからこれらは直接アクセスしたり子プロセスに渡したりできます。
+これらは、プログラムの起動時にコマンドラインからリダイレクトが
+与えられたかのように動作します。
 
 =begin original
 
@@ -1458,8 +1453,8 @@
 
 =end original
 
-It's probably more interesting to connect these to pipes.  For example:
-(TBT)
+これらをパイプにつなぐ方がより興味深いでしょう。
+例えば:
 
     $pager = $ENV{PAGER} || "(less || more)";
     open(STDOUT, "| $pager")
@@ -1475,12 +1470,12 @@
 
 =end original
 
-This makes it appear as though your program were called with its stdout
-already piped into your pager.  You can also use this kind of thing
-in conjunction with an implicit fork to yourself.  You might do this
-if you would rather handle the post processing in your own program,
-just in a different process:
-(TBT)
+これによって、プログラムの標準出力がが既にページャとパイプで
+つながれているかのように見えます。
+このようなことはまた、自分自身を暗黙に fork したものと結合するためにも
+使えます。
+自分自身のプログラムの別のプロセスでで後処理を扱いたい場合、
+以下のようにできます:
 
     head(100);
     while (<>) {
@@ -1505,9 +1500,8 @@
 
 =end original
 
-This technique can be applied to repeatedly push as many filters on your
-output stream as you wish.
-(TBT)
+このテクニックは、繰り返しプッシュすることで、出力ストリームに好きなだけ
+多くのフィルタを適用できます。
 
 =head1 Other I/O Issues
 
@@ -1535,10 +1529,9 @@
 
 =end original
 
-When is a file not a file?  Well, you could say when it exists but
-isn't a plain file.   We'll check whether it's a symbolic link first,
-just in case.
-(TBT)
+ファイルがファイルでないときは?
+えっと、プレーンファイルでないものの時、と言いたいんですよね。
+まず、念のために、それがシンボリックリンクかどうかを調べます。
 
     if (-l $file || ! -f _) {
         print "$file is not a plain file\n";
@@ -1555,13 +1548,15 @@
 
 =end original
 
-What other kinds of files are there than, well, files?  Directories,
-symbolic links, named pipes, Unix-domain sockets, and block and character
-devices.  Those are all files, too--just not I<plain> files.  This isn't
-the same issue as being a text file. Not all text files are plain files.
-Not all plain files are text files.  That's why there are separate C<-f>
-and C<-T> file tests.
-(TBT)
+えーと、ファイルの他にどんな種類のファイルがあるのでしょう?
+ディレクトリ、シンボリックリンク、名前付きパイプ、Unix ドメインソケット、
+キャラクタデバイス、ブロックデバイスです。
+これらも全てファイルです -- 単に I<プレーン> ファイルではないと
+いうだけです。
+これはテキストファイルと同じ問題ではありません。
+全てのテキストファイルがプレーンファイルではありません。
+全てのプレーンファイルがテキストファイルではありません。
+これが、C<-f> と C<-T> のファイルテストが分離している理由です。
 
 =begin original
 
@@ -1571,10 +1566,8 @@
 
 =end original
 
-To open a directory, you should use the C<opendir> function, then
-process it with C<readdir>, carefully restoring the directory 
-name if necessary:
-(TBT)
+ディレクトリを開くには、C<opendir> 関数を使って、それから
+C<C<readdir> で処理します; もし必要なら注意深くディレクトリ名を復元します:
 
     opendir(DIR, $dirname) or die "can't opendir $dirname: $!";
     while (defined($file = readdir(DIR))) {
@@ -1590,10 +1583,10 @@
 
 =end original
 
-If you want to process directories recursively, it's better to use the
-File::Find module.  For example, this prints out all files recursively
-and adds a slash to their names if the file is a directory.
-(TBT)
+ディレクトリを再帰的に処理したい場合は、File::Find モジュールを使った方が
+いいでしょう。
+例えば、これは全てのファイルを再帰的に表示して、もしファイルが
+ディレクトリの場合は末尾にスラッシュを追加します。
 
     @ARGV = qw(.) unless @ARGV;
     use File::Find;
@@ -1605,8 +1598,7 @@
 
 =end original
 
-This finds all bogus symbolic links beneath a particular directory:
-(TBT)
+以下は、特定のディレクトリ以下から偽のシンボリックリンクを全て探します:
 
     find sub { print "$File::Find::name\n" if -l && !-e }, $dir;
 
@@ -1618,10 +1610,10 @@
 
 =end original
 
-As you see, with symbolic links, you can just pretend that it is
-what it points to.  Or, if you want to know I<what> it points to, then
-C<readlink> is called for:
-(TBT)
+上述したように、シンボリックリンクの場合、単にそれが指しているもの振りを
+することができます。
+あるいは、もしそれが I<何を> 指しているのかを知りたい場合は、
+C<readlink> を呼び出します:
 
     if (-l $file) {
         if (defined($whither = readlink($file))) {
@@ -2097,8 +2089,7 @@
 =end original
 
 PerlIO の機能に関する完全な議論はこのチュートリアルの対象外ですが、
-but here is how to recognize the layers being used:
-(TBT)
+以下は層がどのように使われているかです:
 
 =over 4
 
@@ -2129,8 +2120,7 @@
 
 =end original
 
-The two-argument form of C<binmode> is being used, for example
-(TBT)
+2 引数形式の C<binmode> が使われています; 例えば
 
     binmode($fh, ":encoding(utf16)");
 
@@ -2143,9 +2133,9 @@
 
 =end original
 
-For more detailed discussion about PerlIO see L<PerlIO>;
-for more detailed discussion about Unicode and I/O see L<perluniintro>.
-(TBT)
+PerlIO に関するより詳細な議論については L<PerlIO> を参照してください;
+Unicode と I/O に関するより詳細な議論については L<perluniintro> を
+参照してください。
 
 =head1 SEE ALSO 
 
@@ -2157,49 +2147,22 @@
 
 =end original
 
-The C<open> and C<sysopen> functions in perlfunc(1);
-the system open(2), dup(2), fopen(3), and fdopen(3) manpages;
-the POSIX documentation.
-(TBT)
+perlfunc(1) の C<open> 及び C<sysopen> 関数;
+システムの open(2), dup(2), fopen(3), fdopen(3) の man ページ;
+POSIX 文書。
 
 =head1 AUTHOR and COPYRIGHT
 
-=begin original
-
-Copyright 1998 Tom Christiansen.  
-
-=end original
-
 Copyright 1998 Tom Christiansen.  
-(TBT)
-
-=begin original
 
 This documentation is free; you can redistribute it and/or modify it
 under the same terms as Perl itself.
 
-=end original
-
-This documentation is free; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-(TBT)
-
-=begin original
-
-Irrespective of its distribution, all code examples in these files are
-hereby placed into the public domain.  You are permitted and
-encouraged to use this code in your own programs for fun or for profit
-as you see fit.  A simple comment in the code giving credit would be
-courteous but is not required.
-
-=end original
-
 Irrespective of its distribution, all code examples in these files are
 hereby placed into the public domain.  You are permitted and
 encouraged to use this code in your own programs for fun or for profit
 as you see fit.  A simple comment in the code giving credit would be
 courteous but is not required.
-(TBT)
 
 =head1 HISTORY
 



perldocjp-cvs メーリングリストの案内
Back to archive index