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

Re: why can't I get data from DBM in mod_perl


suppressed am Freitag, 24. November 2006 11:27:

[snipped]
> Watch this:
>  | suppressed:~$ perl
>  | use DB_File;
>  |
>  | tie my %dbh, 'DB_File', "foobar" || die "Argh: $@";
>  | $dbh{'one'}=1;
>  | $dbh{'two'}=2;
[snipped]

Hello Tomás

This won't die if the tie failed, because of the 
operator precedences in this statement.

Either use 

tie (my %dbh, 'DB_File', 'foobar') || die "Argh: $@";

or 

tie my %dbh, 'DB_File', 'foobar' or die "Argh: $@";

Dani


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.