in reply to tieing variables

I don't think there is an easy way to just tie a C data structure to a Perl object. You can write a Perl object/module to wrap the C struct though. The Inline might even make that task easier, but Inline tends to be a bit harder to maintain than just writing your own module and XS code.

There is a section titled "Perl Objects And C Structures" in the perlxs manpage that will probably help point you in the right direction.

I'm sure you can acheive what you want, it just might be a bit of work to do it.