I am quite new to Perl and have figured out how to symlink files. Can you do this with directories as well? I would like to make a symlink between a certain directory and one or more other directories so if I edit a file in the original directory, changes will be updated in the symlinked directories. Is this possible?
edit: my Perl code for creating symlinks for files in a given directory is below.
Thanks
#!/usr/bin/perl
$fileDirectory = "/home/Alan/Perl/Files/";
$symLinkDirectory = "/home/Alan/Perl/SymFiles/";
opendir ( DIR, $fileDirectory ) || die "Error in opening directory $fileDirectory\n";
while( ($fileName = readdir(DIR))){
my $filePath = $fileDirectory.$fileName;
symlink("$filePath","$symLinkDirectory".$fileName);
}
closedir(DIR);