in reply to What happened to my globally declared hash when moved to OO Perl code?

I would go a step further and make an accessor for %TZMap

sub TZMap { my $self = shift; if (@_) { $self->{TZMap} = {@_} } return $self->{TZMap}; }

And then later

sub check_timezones { # same as ... print Dumper { $self->TZMap() }; # same as ... }

Furthermore, I'd look into object construction modules out on CPAN. I personally recommend Moose


Smoothie, smoothie, hundre prosent naturlig!