[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Problems with DB_File



This code fails using MacPerl 5.15r4 on:
Quadra 950, System 7.6.1, CFM68k MacPerl
Power Macintosh 7200/90, System 7.6.1, Power Mac Native MacPerl

But it works on:
PowerBook 165, System 7.6.1, CFM68k MacPerl

All systems have sufficient RAM and Storage.  They are all fully
functioning
to the best of my knowledge.
The DBM file fails to return values from a certain point on, depending
on
the value of the variable $sl.  

HELP! 

Russell J. Jungwirth
----------------------------------------------

use Mac::Files;
use DB_File;

$DBM_LOCAL_PATH = "MAC 7:Desktop Folder:DBMs";
$sl = 10;
FSpDelete("$DBM_LOCAL_PATH:dbm_file_moves_path");
OUTER: for ($i = 1000;$i <= 2000; $i = $i + 100)  {
	print "Loading $i\n";

tie(%DB_origpath,'DB_File',"$DBM_LOCAL_PATH:dbm_file_moves_path",O_RDWR|
O_CREAT,0777) || die $!;
	for ($j = ($i-100);$j<=$i;$j++)  {
		$DB_origpath{"$j"} = ("x" x $sl);
	}
	print "Reading $i\n";
	for ($k=900;$k<=$i;$k++)  {
		if ($DB_origpath{"$k"} eq "") {
			MacPerl::Answer("$i $k");
			last OUTER;
		}
	}
 	$ret_val = untie(%DB_origpath);
}


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch