in reply to Re^4: Constructing a hash - why isn't my regex matching anything
in thread Constructing a hash - why isn't my regex matching anything

How much memory do you have available? The following test case on my system uses 34 MB (according to top) after having filled the hash, and a total of 110 MB after having created the dump string.

#!/usr/bin/perl -w use strict; use Data::Dumper; my $key_ = '//programfiles/documents/data/lookup/script_auth_pap.h'; my $val_ = 'root\edit\perl\scripts\scripths\sec\inc\script_auth_pap.h' +; my $c = 0; my %hash; for (1..125000) { my $key = "$key_$c"; my $val = "$val_$c"; $c++; $hash{$key} = $val; } <>; # 34 MB my $dump = Dumper \%hash; <>; # 110 MB