Copyright © tutorialspoint.com

# PERL readlink Function

## 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

Copyright © tutorialspoint.com