in reply to get difference of two arrays
After fixing the errors, I just removed the square brackets around grep:
my @output = grep { ! exists $h{$_} } @a;
Square brackets introduce an anonymous array. You want a list, not an array reference, so no square brackets needed.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: get difference of two arrays
by naturalsciences (Beadle) on Nov 14, 2013 at 13:49 UTC |