in reply to Re: Pass class object as argument to perl script
in thread Pass class object as argument to perl script

There is no passing argument but secondscript can use variables declared in firstscript

Right, but only if the variable is declared with our, in both files, see perlfaq8:

1) do $file is like eval `cat $file`, except the former 1.1: searches @INC and updates %INC. 1.2: bequeaths an *unrelated* lexical scope on the eval'ed code.

my variables are file scoped and thus not visible in secondscript.pl.

Replies are listed 'Best First'.
Re^3: Pass class object as argument to perl script
by ccn (Vicar) on Oct 31, 2008 at 08:38 UTC
    Yes, I forgot to check it. thx