CristianLuca
Programmer
How can i emulate this functionality without printing in print_1 along with piping (print "$a|$b") and then using a pattern match to extract the results ? :
Obs : i don't mind piping the result into on string , i just don't want to put trash in STDIN or other file, i just need the result.
#script_1
my $a = "a";
my $b = "1";
# do something to return ($a,$b)
#script_2
my ($a,$b) = system("perl script_1");
print "$a\n";
print "$b\n";
output :
a
1
Thank you in advance,
Cristian
Obs : i don't mind piping the result into on string , i just don't want to put trash in STDIN or other file, i just need the result.
#script_1
my $a = "a";
my $b = "1";
# do something to return ($a,$b)
#script_2
my ($a,$b) = system("perl script_1");
print "$a\n";
print "$b\n";
output :
a
1
Thank you in advance,
Cristian