frank1 has asked for the wisdom of the Perl Monks concerning the following question:
How can i print the values from different filename using require
perl file 1.pl #!/usr/bin/perl my $var1 = "hello"; my $var2 = " perl!";
perl 2.pl #!/usr/bin/perl require '1.pl'; print $var1; print $var2;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: accessing values
by NetWallah (Canon) on Oct 15, 2020 at 03:35 UTC | |
by frank1 (Monk) on Oct 15, 2020 at 14:33 UTC | |
|
Re: accessing values
by choroba (Cardinal) on Oct 14, 2020 at 21:12 UTC | |
by frank1 (Monk) on Oct 14, 2020 at 21:26 UTC | |
by LanX (Saint) on Oct 14, 2020 at 21:31 UTC | |
|
Re: accessing values
by Fletch (Bishop) on Oct 14, 2020 at 21:20 UTC |