M
Markus Hänchen
Hi,
I guess there are better ways to hand over a variable from one perl
script to another. Knowing very little about Perl I came up with this
solution:
$variable = 1;
open TEMP, ">temp.txt";
truncate TEMP, 1;
print TEMP "$variable\n";
close TEMP;
system "runit.pl";
#! /usr/bin/perl
@ARGV = qw# temp.txt #;
while (defined($line = <>)) {
$cta += 1;
@inval{$cta} = $line;
}
chomp($variable = $inval{1});
Cheers,
Markus
I guess there are better ways to hand over a variable from one perl
script to another. Knowing very little about Perl I came up with this
solution:
$variable = 1;
open TEMP, ">temp.txt";
truncate TEMP, 1;
print TEMP "$variable\n";
close TEMP;
system "runit.pl";
#! /usr/bin/perl
@ARGV = qw# temp.txt #;
while (defined($line = <>)) {
$cta += 1;
@inval{$cta} = $line;
}
chomp($variable = $inval{1});
Cheers,
Markus