nationavon
MIS
Here is my scenario:
1) I am using RedHat linux.
2) The default version of Perl is 5.6, is installed in /usr/bin, and is owned by root.
3) I have installed Perl 5.8 in /opt/perl as a user named perl.
I have the following script:
use DB_File;
$file = "/u01/app/jomarmgr/users/users";
# print out history file offsets
dbmopen(%DBM, $file, 0444) || die("$!");
while (($key,$val) = each %DBM) {
print $key, ' = ', unpack('L',$val), "\n";
}
dbmclose(%DBM);
When I use Perl 5.6 as the interpreter it works fine. When I use 5.8 as the interpreter I get a messsage that says "File exists" or "Permission denied". The permissions on the users file is 777.
What is the deal? I get the same results using tie instead of dbmopen. There appears to be an issue with permissions on the 5.8 interpreter.
I know 5.8 works because I have other scripts using it. But they are not using dbmopen.
Nathan
1) I am using RedHat linux.
2) The default version of Perl is 5.6, is installed in /usr/bin, and is owned by root.
3) I have installed Perl 5.8 in /opt/perl as a user named perl.
I have the following script:
use DB_File;
$file = "/u01/app/jomarmgr/users/users";
# print out history file offsets
dbmopen(%DBM, $file, 0444) || die("$!");
while (($key,$val) = each %DBM) {
print $key, ' = ', unpack('L',$val), "\n";
}
dbmclose(%DBM);
When I use Perl 5.6 as the interpreter it works fine. When I use 5.8 as the interpreter I get a messsage that says "File exists" or "Permission denied". The permissions on the users file is 777.
What is the deal? I get the same results using tie instead of dbmopen. There appears to be an issue with permissions on the 5.8 interpreter.
I know 5.8 works because I have other scripts using it. But they are not using dbmopen.
Nathan