perl-5.38.0
rename OLDNAME,NEWNAME

Changes the name of a file; an existing file NEWNAME will be clobbered. Returns true for success; on failure returns false and sets $!.

ファイルの名前を変更します; NEWNAME というファイルが既に存在した場合、 上書きされるかもしれません。 成功時には真を返します; 失敗時には偽を返し、 $! を設定します。

Behavior of this function varies wildly depending on your system implementation. For example, it will usually not work across file system boundaries, even though the system mv command sometimes compensates for this. Other restrictions include whether it works on directories, open files, or pre-existing files. Check perlport and either the rename(2) manpage or equivalent system documentation for details.

この関数の振る舞いはシステムの実装に大きく依存して異なります。 例えば、普通はファイルシステムにまたがってパス名を付け替えることはできません; システムの mv がこれを補完している場合でもそうです。 その他の制限には、ディレクトリ、オープンしているファイル、既に存在している ファイルに対して使えるか、といったことを含みます。 詳しくは、perlport および rename(2) man ページあるいは同様の システムドキュメントを参照してください。

For a platform independent move function look at the File::Copy module.

プラットフォームに依存しない move 関数については File::Copy モジュールを参照してください。

Portability issues: "rename" in perlport.

移植性の問題: "rename" in perlport