[EMAIL PROTECTED] am Freitag, 24. November 2006 11:27:

[snipped]
> Watch this:
>  | [EMAIL PROTECTED]:~$ 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

Reply via email to