#!/usr/bin/perl use File::Find; if (!-f $ARGV[0]) { die "File \"$ARGV[0]\" does not exist"; } sub wanted { if (length $_ == 1) { return; } if (-d) { $temp = '../' x (split(/\//,$File::Find::name) - 1).$ARGV[0]; $target = $File::Find::name.'/'.$ARGV[0]; print $target," -> ",$temp,"\n"; symlink($temp,$target); } } find(\ &wanted,'.');