in reply to Re^23: global var
in thread global var
If this is what you mean, try it
package module_1; require Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw($A); our $A = 100; 1;
#/usr/bin/perl # script_1.cgi use strict; use CGI ':standard'; use lib 'path/to/module'; use module_1 qw($A); $A = 300; print header,start_html, h1("\$A = $A"), a( {href=>"script_2.cgi"}, "script_2"), end_html;
poj#/usr/bin/perl # script_2.cgi use strict; use CGI ':standard'; use lib 'path/to/module'; use module_1 qw($A); print header,start_html, h1("\$A = $A"), a( {href=>"script_1.cgi"} ,"script_1"), end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^25: global var
by tultalk (Monk) on Apr 23, 2017 at 20:24 UTC | |
by hippo (Archbishop) on Apr 24, 2017 at 11:24 UTC | |
by tultalk (Monk) on Apr 24, 2017 at 15:04 UTC | |
by Anonymous Monk on Apr 24, 2017 at 15:25 UTC | |
by tultalk (Monk) on Apr 24, 2017 at 19:34 UTC | |
by poj (Abbot) on Apr 24, 2017 at 17:40 UTC | |
by tultalk (Monk) on Apr 24, 2017 at 19:28 UTC | |
by huck (Prior) on Apr 24, 2017 at 20:43 UTC | |
by tultalk (Monk) on Apr 25, 2017 at 12:24 UTC | |
| |
by poj (Abbot) on Apr 25, 2017 at 17:50 UTC |