Tutorials Point


  Perl Home

  PERL Functions

© 2013 TutorialsPoint.COM


  Home     References     About TP     Advertising  

PERL readlink Function



Advertisements

Syntax

readlink EXPR

readlink


Definition and Usage

Returns the pathname of the file pointed to by the link EXPR, or $_ if EXPR is not specified.

Return Value

  • undef on error

  • otherwise pathname of the file

Example

Try out following example:

#!/usr/bin/perl -w

# assume /tmp/test is a symbolic link on /tmp/usr/test.pl

readlink "/tmp/test";

It will produce following results:

/tmp/usr/test.pl


Advertisements


  

Advertisements