Perl functions references-link Function - Perl Scripting

What is the link function in perl?


This function creates a new file name, NEWFILE, which is linked to the file OLDFILE. The function creates a hard link; if you want a symbolic link, use the symlink function.


Following is the simple syntax for this function −

Return Value

This function returns 0 on failure and 1 on success.


Following is the example code showing its basic usage, this will create new file using existing file −
When the above code is executed, it produces the following result −

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Perl Scripting Topics