Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) Determine where a symbolic lin ...Remove a directory (Berikutnya)
Functions for filehandles, files, or directories

Change a filename

Daftar Isi

  • rename OLDNAME,NEWNAME

    Changes the name of a file; an existing file NEWNAME will beclobbered. Returns true for success, false otherwise.

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

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

    Portability issues: rename in perlport.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) Determine where a symbolic lin ...Remove a directory (Berikutnya)