How to check and delete a symlink if it exists, using Perl?
问题 if (-e "$ENV{MYHOME}/link") { system("rm $ENV{MYHOME}/link"); } This is the code being used to check if a symlink exists and remove it if it does. I am tracking a bug where this code does not work. I have not been able to figure it out as of now, but what is happening is that this code is unable to remove the symlink, which results in a 'File exists' error down the line. I wanted to check if there is some fundamental flaw with this technique? I also read about http://perldoc.perl.org