Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: NDBM_File won't store data

by dash2 (Hermit)
on Aug 28, 2003 at 17:16 UTC ( #287456=note: print w/replies, xml ) Need Help??

in reply to NDBM_File won't store data

My only guess would be that MakeDate() returns some kind of date object rather than a string - maybe it autostringifies when you print it, but NDBM_File can't cope with it and silently fails to store it. Just a guess, I fear.
A massive flamewar beneath your chosen depth has not been shown here

Replies are listed 'Best First'.
Re: Re: NDBM_File won't store data
by HamNRye (Monk) on Aug 28, 2003 at 17:18 UTC

    Here is the MakeDate sub:

    sub MakeDate { my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localti +me(time); $year = ($year + 1900) ; $mon++ ; my $date = sprintf("%04D%02d%02d", $year, $mon, $mday); return $date; }

    That should be a string right??

      Yup... so my idea wasn't right.

      I've had some problems using DBM_* in Perl before - some of them have awkward little bugs like a tendency to die if you untie the object in the right place. But what yours is, I don't know.
      A massive flamewar beneath your chosen depth has not been shown here

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://287456]
[LanX]: due coretti, per favore! ;-)
[shmem]: grappa, ginebra o amaretto?
[shmem]: LanX: tried strange stuff wrt autocomplete. No luck :(
[erix]: sambuca
[LanX]: machiato!
shmem fills a glas with sambuca, drops 3 beans of coffee into it, lights the stuff and hands it to erix
[Your Mother]: Liquore Strega. :P

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2017-03-28 12:16 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (330 votes). Check out past polls.