#!/usr/bin/env perl use strict; use warnings; use Data::Dump qw(pp); EXAMPLE: { my $happy_camper = { Rambler => 'The Yellow Rose of Texas', Wagon => 'There may be flies on them there guys but there are no flies on us', Caskit => 'The Rain in Spain goes mainly down the drain', Skate => 'The Quick Brown Fox Jumped Over The Lazy Dogs Back', Lemon => 'Love the smell of napalm in the morning' }; my $newkeys = 'KEYME000'; foreach ( 1 .. 900000 ) { foreach my $_key (keys %$happy_camper) { if ( int(rand 300000) == 1 ) { $happy_camper->{ ++$newkeys } = 'Shame on you!'; } } } pp $happy_camper; } exit 0;