in reply to the #include business
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: the #include business
by esh (Pilgrim) on Aug 23, 2003 at 07:09 UTC |