R
Regent
I must say I'm a newbie, writing a script that tries to unlink a
particular file. Both the name of the file and that of the folder are
variable scalar strings. Now that I habitually write with -T and
strictures, I always get the error message "Insecure dependency in
unlink while running with -T switch". The relevant block of code:
if ("$root/$uploadDir/$origfn" ne "")
{
my $toDel = "$root/$uploadDir/$origfn";
unlink ($toDel) or die "$!";
}
where $root is the root path of the web site, $uploadDir is a folder for
temporary uploads, $origfn is the name of the file to be deleted.
How do I solve this problem? Thanks
particular file. Both the name of the file and that of the folder are
variable scalar strings. Now that I habitually write with -T and
strictures, I always get the error message "Insecure dependency in
unlink while running with -T switch". The relevant block of code:
if ("$root/$uploadDir/$origfn" ne "")
{
my $toDel = "$root/$uploadDir/$origfn";
unlink ($toDel) or die "$!";
}
where $root is the root path of the web site, $uploadDir is a folder for
temporary uploads, $origfn is the name of the file to be deleted.
How do I solve this problem? Thanks