I have tried to get a list of the unique elements in the first array. (AKA: the elements in the first array that are NOT in the second array.) However my script returns the number of unique elements not the info in each element.
As a newbie to Perl, I know there are many nuances to the language. I have not seen how I am getting a number instead of a list of elements. The only research I have seen is how to get a number of unique elements and apparently, I have discovered another way.
Any help is appreciated. Below is the code.
#!/usr/bin/perl
use strict;
use warnings;
use v5.10;
use XML:Simple;
use LWP::Simple;
use List::Compare;
my @upd = system ("perl test.pl | grep '*.x86_64.rpm'");
my @inst = system ("rpm -qa");
@inst = join( '.rpm', @inst);
my $ls = List::Compare->new( {lists=> [\@upd, \@inst]} );
my @list = $ls->get_unique;
@list = $ls->get_Lonly;
say "@list";