> > Can someone help me understand how does one pass variable to a Perl test > script from the calling program? Is such a mechanism available? To > illustrate my question: > > -------------------- > main.pl > ~~~~~~~ > > print "Running tests...\n"; > > my $var = 2;
Right here you have lexically scoped the 'var' variable, it goes out of scope at the end of the file, try using either 'our' or 'use vars' depending on your version compatibility needs. > > # $var = $main::var; #Can something like this be done, currently this does > not work for me > Should work once you have changed the variable from a lexical to package variable. perldoc -f our perldoc vars http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]