DB File woe
Source : Alex Schroeder: Diary
@foo = (1, 2); $h{"_bar"} = \@foo; $ref = $h{"_bar"}; print "Ok: ", join(', ', @$ref), "\n";
require DB_File; tie %h, "DB_File", "test.db"; @foo = (1, 2); $h{"_bar"} = \@foo; $ref = $h{"_bar"}; print "Bork: ", join(', ', @$ref), "\n";The result:Ok: 1, 2 Bork: What I expect:Ok: 1, 2 Bork: 1, 2What am I not getting right?Tags: Perl
le 16.03.09 à 03:25
dans Mind
-
Article précédent - Commenter - Article suivant -