Hi all,
 I'm trying to do a proof of concept for myself using MLDBM of basically
trying to add two records to a hash. ATM I have the following code

#!/usr/bin/perl

    use strict ;
    use warnings ;
    use MLDBM;
    use Fcntl ;

    my %hash ;
    my $filename = "/tmp/filt" ;
    unlink $filename ;

    my $db = tie(%hash, 'MLDBM', $filename, O_RDRW|O_EXLOCK, 0640) or die
("Cannot open $filename: $!\n");

   %hash = ( '1' => { url => "www.slashdot.org" , title => "News for
nerds" , lastvisit =>" 100000" } );
  %hash .= ( '2' => { url => "www.slashdot.org" , title => "News for
nerds" , lastvisit =>" 100000" } );


  print Data::Dumper->Dump ( [\%hash ]);
  undef $db;
  untie %hash;

and I'm getting

Can't modify private hash in concatenation (.) or string at ./perldbm line
15, near ");"

As such what do I have to do to add entries to the hash (without defining
it all in one hash?) The reason is that I want to writ eaprorgam that will
add a hash each time it is run so just trying to do it on a simple prog
ATM

Rus
-- 
http://www.fsck.me.uk - My blog
http://shells.fsck.me.uk - Hosting how you want it.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to