S'identifier - S'inscrire - Contact

CommunityWiki
Jam session in wikilandia

DB File woe

Source :

@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 - Version imprimable
Article précédent - Commenter - Article suivant -