I thought to do this way. But Top_file not able to receive the data from sub_file.
Top_file.pl
my $top_file_data = "Hi from Top_file\n";
$ENV{'SEND_TO_SUB'} = $top_file_data;
system("perl sub_file.pl");
my $received_data =$ENV{'RECEIVED_DATA'};
say" Message Received from SUB : $received_data";
sub_file.pl
my $data =$ENV{'SEND_TO_SUB'};
say "Message Received from Top : $data";
$ENV{'RECEIVED_DATA'} = "Got Your Message";
Any suggestion how to do it?