in reply to Re^7: Get just the unique value
in thread Get just the unique value
Sure, the end result is that $data only holds the unique values:
From this:
To that:my $data = [ { 'type' => 'Paper' }, { 'type' => 'Paper' }, { 'type' => 'Plastic' }, { 'type' => 'Plastic' }, { 'type' => 'Plastic' }, { 'type' => 'Plastic' }, { 'type' => 'Cotton' }, { 'type' => 'Cotton' }, { 'type' => 'Cotton' }, { 'type' => 'Cotton' }, { 'type' => 'Cotton' }, { 'type' => 'Paper' }, { 'type' => 'Paper' }, { 'type' => 'Paper' }, { 'type' => 'Paper' }, { 'type' => 'Paper' }, ];
$data = [ { 'type' => 'Paper' }, { 'type' => 'Plastic' }, { 'type' => 'Cotton' }, ];
In Section
Seekers of Perl Wisdom