Perl Home
PERL Functions
© 2011 TutorialsPoint.COM
|
PERL symlink Function
Syntax
symlink ( OLDFILE, NEWFILE )
|
Definition and Usage
Creates a symbolic link between OLDFILE and NEWFILE. On systems that don't support symbolic links, causes a fatal error.
Return Value
0 on failure
1 on success
Example
First create one file test.txt in /tmp directory and then try out following example it will create a symbolic link in the same directory:
#!/usr/bin/perl -w
symlink("/tmp/text.txt", "/tmp/symlink_to_text.txt");
|
|

|
|
|