As you know, the error variable $!
has both a numeric and a string value, depending on which context it's used in (that is, the numeric value may be 2, while the string value is "No such file or directory"). I'd like to make error variables like this (assigning to $! doesn't work right). How can I do it? I tried the following, which didn't work:
use Inline 'C';
set_both($v, "I'm a string too!", 123);
print $v+0, " $v\n";
void set_both(SV* var, char* str, int i)