carlebrisson
Programmer
I would like to run reports but store the actual formats in external files. The problem is I don't know how to make the variables local to both perl scripts. If anyone has any better method of achieving this, it would be much appreciated. Obviously, this example does not work.
i.e.:
[test.pl]
#!/usr/bin/perl
use English;
require "my.rpt";
my $name = "Joe Bloe";
$FORMAT_NAME = "REP1";
write;
[my.rpt]
#!/usr/bin/perl
format REP1 =
Hi my name is @<<<<<<<<<<<<<<<<<<<
$name
.
i.e.:
[test.pl]
#!/usr/bin/perl
use English;
require "my.rpt";
my $name = "Joe Bloe";
$FORMAT_NAME = "REP1";
write;
[my.rpt]
#!/usr/bin/perl
format REP1 =
Hi my name is @<<<<<<<<<<<<<<<<<<<
$name
.