You are running into scoping problems. Defining a lexical with my does not produce a variable which can be seen across file barriers.
If test2.pl contained,
I think your program would act as you wish.#!/usr/bin/perl -w use strict; use vars '$x'; $x="this is it\n"; 1;
A more sophisticated approach would make your test2.pl a .pm and define a namespace with package.
After Compline,
Zaxo
In reply to Re: the #include business
by Zaxo
in thread the #include business
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |