- or download this
#!/usr/bin/env perl -l
...
my $last = '';
my @unique = map { $last eq $_ ? () : ($last = $_) } sort @initial;
print "Unique: @unique";
- or download this
Initial: q w e r t y q w e r t y
Unique: e q r t w y
- or download this
#!/usr/bin/env perl -l
...
__DATA__
I am supposed to create a unique array
I am not supposed to use hashes
- or download this
Unique: I a am array create hashes not supposed to unique use