in reply to Strange DBM behavior

I did another test to see if I could read from it, but no such luck. Here's what I got:
#!/usr/bin/perl5 use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); my $cgi = new CGI; use strict; my @scott = $cgi->param('scott'); print "Content-type: text/html\n\n"; my %PL; dbmopen(%PL, "pricelist", 0777) || die "Can't open pricelist DBM: $!"; foreach my $scott (@scott) { if ($scott ne "") { if (defined $PL{$scott}) { my @split = split(/\|/, $PL{$scott}); for(@split) { my ($description,$price) = split/,/; print "Scott: $scott\t$description\t$price\n"; } } else { print "Scott number $scott not found\n"; } } } dbmclose(%PL);
Here's the error I get:
Software error: Missing $ on loop variable at blah blah blah/access.pl line 10.

Replies are listed 'Best First'.
Re: Re: Strange DBM behavior
by davorg (Chancellor) on Jul 04, 2001 at 01:42 UTC