Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!news.cs.indiana.edu!ux1.cso.uiuc.edu!pequod.cso.uiuc.edu!dorner From: dorner@pequod.cso.uiuc.edu (Steve Dorner) Newsgroups: comp.lang.perl Subject: dbm file with integer keys Message-ID: <1991Feb14.163623.20303@ux1.cso.uiuc.edu> Date: 14 Feb 91 16:36:23 GMT Sender: news@ux1.cso.uiuc.edu (News) Reply-To: dorner@pequod.cso.uiuc.edu (Steve Dorner) Organization: University of Illinois at Urbana-Champaign Lines: 32 I have a hefty dbm file, whose keys and values happen to be strings of digits. I haven't been able to use the dbm file in perl. Here's a short program that illustrates the problem: #!/usr/local/bin/perl dbmopen(ID,"IdDB",0) || die "Couldn't open IdDB"; printf "ID{350509089} = %s\n", $ID{"350509089"}; while (($key,$val)=each %ID) { if ($key eq "350509089") {printf "%s:%s\n", $key,$val; exit;} } When I run this program, I get: % test ID{350509089} = 350509089:1858494915 Anybody got any ideas? I'm running v3.0, patchlevel 28, on a NeXT, if that matters. Same thing happens on a Convex running patchlevel 44 (the only other system I tried). Please send email, as I (unfortunately) don't have time to read this group. I will be happy to provide a summary to the group, if such is warranted. (ie, if the answer doesn't begin with, "You complete idiot,".) Thanks! -- Steve Dorner, U of Illinois Computing Services Office Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner