Skip to content

Instantly share code, notes, and snippets.

@ExpandingShapes
Created October 26, 2020 10:54
Show Gist options
  • Save ExpandingShapes/a8f66627fd15fcb82def2f229ae9ca57 to your computer and use it in GitHub Desktop.
Save ExpandingShapes/a8f66627fd15fcb82def2f229ae9ca57 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
$, = ", ";
sub GetSymmetricDifference {
my (@firstArr, @secondArr) = @_;
my %uniqueHash = ();
push @firstArr, @secondArr;
@uniqueHash{@firstArr} = ();
return keys % uniqueHash;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment