Skip to content

Instantly share code, notes, and snippets.

@ExpandingShapes
Created October 26, 2020 11:05
Show Gist options
  • Select an option

  • Save ExpandingShapes/b0984f24f5850a7ab4d82e7a6f70e950 to your computer and use it in GitHub Desktop.

Select an option

Save ExpandingShapes/b0984f24f5850a7ab4d82e7a6f70e950 to your computer and use it in GitHub Desktop.

Revisions

  1. ExpandingShapes created this gist Oct 26, 2020.
    14 changes: 14 additions & 0 deletions 01.pl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/usr/bin/env perl
    use strict;
    use warnings;
    use Data::Dumper;

    $, = " ";

    sub GetUniqueSorted {
    my (@arr) = @_;
    my %uniqueHash = ();

    @uniqueHash{@arr} = ();
    return sort keys % uniqueHash;
    }