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";
In reply to Re: "do" command versus "source" in bash
by shmem
in thread "do" command versus "source" in bash
by maxamillionk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |