Hash::Unique - It's hash manipulation module
This subroutine makes hash-array unique by specified key.
use Hash::Unique; my @hash_array = ( {id => 1, name => 'tanaka'}, {id => 2, name => 'sato'}, {id => 3, name => 'suzuki'}, {id => 4, name => 'tanaka'} ); my @unique_hash_array = Hash::Unique->get_unique_hash(\@hash_array, "name");
Contents of "@unique_hash_array"
( {id => 1, name => 'tanaka'}, {id => 2, name => 'sato'}, {id => 3, name => 'suzuki'} )
Copyright (C) matsumura-taichi.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
matsumura-taichi <hiroto.in.the.cromagnons@gmail.com>
To install Hash::Unique, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hash::Unique
CPAN shell
perl -MCPAN -e shell install Hash::Unique
For more information on module installation, please visit the detailed CPAN module installation guide.