Here is the code snippet of main script. The main script is calling populate_details script through pipe. Sending 2 arrays inv1 and inv2 as input.
*my $fh = FileHandle->new('| ./populate_details')
print $fh Data::Dumper->Dump([\@inv1], [qw(inv1)]);
print $fh Data::Dumper->Dump([\@inv2], [qw(inv2)]);*
The question is , how to capture the return code and return value from populate_details script ? For example, the populate_details script is sending as hash of return values.
Could you Please help ?
open(my $fh, '| ./populate_details')