> -----Original Message----- > From: Bruno Negrao [mailto:[EMAIL PROTECTED]] > Sent: 24 September 2002 23:49 > To: [EMAIL PROTECTED] > Subject: dbmopen doesn't work > > > Hi all, > Could someone say to me why this program doesn't run? (it > doesn't print the database values) > > #!/usr/bin/perl -w > dbmopen(%a,"testdb",0666) || die "couldn't create/access the file $!"; > $a = $b = 0; > until ($a < 20){ # create items in the testdb.db file
perhaps you really mean while ($a < 20){ # create items in the testdb.db file Also: nasty mix of hash and scalar naming, no 'use strict' mmm - naughty naughty 8-) > $a{key$a} = $b; > $a = $b++; > } > while ( ($key,$value) = each(%a) ) { > print "$key $value\n"; # this is not printing anything!! > } > > I'm using a RedHat 6.2. Perl 5. > > thank you, > ------------------------------------------------- > -- Bruno Negrão -- Suporte > -- Plugway Acesso Internet Ltda. > -- (31)34812311 > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]