bradcathey has asked for the wisdom of the Perl Monks concerning the following question:
Fellow monasterians,
I'm getting the "Insecure dependency in open while running with -T switch at scriptname line xxx" error. Googled and Super Searched and thought my problem might be my path. My regex looks okay, but now I have doubts. I'm guessing it's the path. Should it be set to the directory of the script or the destination directory?
NOTES: /xmpx/ is the directory that contains my executable scripts, and the subroutine is uploading an image.
What I am I not getting? TIA.
$ENV{'PATH'} = 'home/username/www/xmpx/'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; ... sub uploader { my $sourcefile = $query->param('uploadthis'); $sourcefile =~ /([\w .-]+)$/i; #strip off path my $newfile = $1; open (OUTFILE, ">../$branch/images/$newfile") or die "Cannot open $ +newfile: $!"; ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Insecure dependency error and $ENV{'PATH'}
by Ovid (Cardinal) on Aug 05, 2004 at 15:11 UTC | |
by bradcathey (Prior) on Aug 05, 2004 at 17:04 UTC | |
by merlyn (Sage) on Aug 05, 2004 at 17:32 UTC | |
by bradcathey (Prior) on Aug 05, 2004 at 19:03 UTC | |
|
•Re: Insecure dependency error and $ENV{'PATH'}
by merlyn (Sage) on Aug 05, 2004 at 15:13 UTC | |
|
Re: Insecure dependency error and $ENV{'PATH'}
by diotalevi (Canon) on Aug 05, 2004 at 16:23 UTC | |
|
Re: Insecure dependency error and $ENV{'PATH'}
by gellyfish (Monsignor) on Aug 05, 2004 at 15:12 UTC |