antioch has asked for the wisdom of the Perl Monks concerning the following question:
That would be the main script file and this would be the external file, "external_subs.txt" :require "external_subs.txt"; my $a = 1; my $b = blue; if($a == 1) { &numbers } else{ die;
If you take out the 'my' fuctions, the whole thing works fine as you can see. But put them in and your stuck in my situation. =\sub numbers { print "$b"; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing Variables to External Subroutines (Perl/Tk)
by NetWallah (Canon) on Jun 15, 2004 at 05:22 UTC | |
|
Re: Passing Variables to External Subroutines (Perl/Tk)
by Plankton (Vicar) on Jun 15, 2004 at 05:18 UTC | |
|
Re: Passing Variables to External Subroutines (Perl/Tk)
by matija (Priest) on Jun 15, 2004 at 05:23 UTC | |
|
Re: Passing Variables to External Subroutines (Perl/Tk)
by antioch (Sexton) on Jun 15, 2004 at 13:08 UTC |