From: Mike Blezien <[EMAIL PROTECTED]>
> Was hoping some one may have some helpful suggestion as how to deal
> with the a potiental problem. We have a dedicated server we would like
> to update perl on, from v. 5.6.1 to 5.8.* and have found out the the
> existing .db files used by alot of our customer with shopping carts
> that use DBM files to store various data, the .db files will not work
> on 5.8.* version.
> 
> Is there a way to quickly convert the existing .db DBM files used by
> perl 5.6.1 so they will work if you upgrade perl to 5.8.1 without
> loosing all these .db files... and causing all kinds of problems with
> our customers :(

Export them all as CSVs (or something), upgrade perl, convert the 
CSVs back to DBMs. Use Text::CSV_XS to write&read the CSV.

It should take just two tiny scripts. First would use File::Find to 
search for the DBMs, tie them to a hash, create filename.db.csv, loop 
over the hash with each() and write the $keys and $values in the the 
file using Text::CSV_XS.
The other would then do the oposite conversion.

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to