#!/usr/bin/perl # http://perlmonks.org/?node_id=1169599 use strict; use warnings; my @data = 1..6e4; # fake strings my @rows = 1+3e4..6e5+3e4; # fake strings my %combined; @combined{@data, @rows} = (); @data = keys %combined; print "size = " . @data, "\n";