in reply to "do" command versus "source" in bash
Of course. Just define your variable in the invoking program as well:
#!/usr/bin/perl use warnings; use strict; our $path1; do './paths.pl'; # you have to use ./, since '.' is no longer in @INC print $path1."\n";
|
|---|