in reply to perl Data::Dumper'ed to C++
You could also try Data::Denter which should be more easily parsed then Data::Dumper's output.
You could also have your perl code write out the structures in a format designed specifically for the C++ program to easily read. How complex this syntax would be would depend on how complex the data you are reading is, though in many cases you could probably make it pretty simple (e.g. a flat file, key on one line, number of lines in value on the next. This is pretty easy to parse in C++.)
Another option is too embed a perl interperator in your C++ program, or embed C++ in the perl program, and have your C++ use perl's API. But, this may very likely be inappropriate for your situation. update: for information on putting perl inside your C++ program see perlembed. For putting C++ in perl see perlxs.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(bbfu) (Inline::CPP) Re2: perl Data::Dumper'ed to C++
by bbfu (Curate) on Sep 06, 2001 at 06:05 UTC |