Sisyphus <[EMAIL PROTECTED]> writes: > It makes no difference whether $VAR is declared with 'my' or not. In > either case perl's func() can see it.
The consequence of defining a variable as 'my' means that it is a local variable that is not in the Perl symbol table. I don't know if this has consequences for accessing the variable from C. > > use Inline C => <<EOF; > > In my inline scripts I always write the above line as: > use Inline C => <<'EOF'; If you surround the HERE-DOC qualifier with double quotes all Perl variables inside the test will be interpolated. If you use double quotes, variables will *not* be interpolated. If you don't use quotes, Perl defaults to double quote behavior. > Depending on your OS (I think) it may be necessary to leave a blank > line between the closing } and the EOF. On my Win32 box, if I don't do > that, the EOF cannot be found and the script aborts. Hmm.. Sounds odd. You do have to be careful that you don't put in any extra whitespace after the EOF, because then Perl will see it as 'EOF ' and not 'EOF', which are not the same. Cheers, jas.