#!/usr/bin/perl -w
use strict;
my $filetolink = 'a.pl';
my $linkname = 'linktoa.pl';
symlink($filetolink, $linkname) or die "link creation failed: $!";
print "link created ok!\n";
my $readlinkresult = readlink($linkname);
print "$linkname is a sym link to $readlinkresult\n";