Hi,
>> SV* perl_get_sv("package::varname", FALSE);
>>
>> This returns NULL if the variable does not exist.
>>
>> If you want to know if this variable (or any other SV) is actually
>> defined, you can call:
>>
>> SvOK(SV*)
>
> Note that this works for global (package) variables only.
>
> Is there a similar way to access lexical variables?
I'm not sure, but I don't really see the use of this approach.
What you want to do would be the same like trying to access a sub's
variable from outside the sub. This doesn't make sense, does it?
Best regards,
Olli