Multiple choice technology programming languages

Which Perl function is used to change the name of a file?

  1. nameas

  2. rename

  3. name

  4. now_known_as

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Perl, the built-in rename function is used to change the name of a file. It takes two arguments: the old filename and the new filename, returning true on success and false on failure.