On Tue, Sep 24, 2002 at 07:49:24PM -0300, Bruno Negrao wrote: > #!/usr/bin/perl -w
Where's use strict? > dbmopen(%a,"testdb",0666) || die "couldn't create/access the file $!"; > $a = $b = 0; > until ($a < 20){ # create items in the testdb.db file This loop will never run. $a == 0, which is less than 20. > $a{key$a} = $b; You must have meant $a{"key$a"} = $b. $a{key$a} does not mean what you think it means. Also, I would avoid having both %a and $a; while it can be useful in some cases to have two variables of the same name, here it's just confusing. > $a = $b++; > } > while ( ($key,$value) = each(%a) ) { > print "$key $value\n"; # this is not printing anything!! > } Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]