my $packages_data_str = do { local $/; <STDIN> }; # read the whole STDIN into $packages_data_str variable

my @packages_data = eval $packages_data_str;

foreach my $package (@packages_data) {
	my $registryUid = "";
	my $filename = "";
	foreach my $params (@{$package->{'_children'}}) {
		if ($params->{'_name'} eq 'registryUid') {
			$registryUid = $params->{'_value'};
		}
		if ($params->{'_name'} eq 'package-archive') {
			$filename= $params->{'_value'};
		}
	}
	print "$registryUid $filename\n"
}
