in reply to Remove redundency from an array
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my @array = (1,1,3,3,2,3,5,7,5,2); my %h; $h{$_}++ for @array; @array = keys %h; print Dumper \@array;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Remove redundency from an array
by jdporter (Paladin) on Sep 24, 2007 at 12:45 UTC | |
by Zen (Deacon) on Sep 24, 2007 at 14:08 UTC | |
by jdporter (Paladin) on Sep 24, 2007 at 14:20 UTC | |
by dsheroh (Monsignor) on Sep 24, 2007 at 14:26 UTC |