in reply to using require as c like #include?

First, there is an error in your example. You are creating $HoH but are dumping %HoH.

Besides that what is happening is that the code brought in by require is in it's own scope. So the variables declared with my go a way when you leave that scope. This is what our is for. If you are using an older (pre 5.6) version of perl you can use vars

$ cat HoH.pl use strict; use Data::Dumper; our $HoH; require 'hash'; print Dumper($HoH);
or
use strict; use Data::Dumper; use vars qw/ $HoH /; require 'hash'; print Dumper($HoH);
Either way you will just have to drop the my in hash (or also declare it our if you are using the first example.)

--

flounder