Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
%Log_rooms = ( "gallery" => { 'BM_shutts_south_00' => 1, 'BM_shutt_no +rth_00' => 1 } );
my $config_file ="/etc/test.conf"; my %Log_rooms; t if (-e $config_file) { print "Reading Configuration from $config_file \n\n"; my $return = do $config_file ; warn "couldn't parse $config_file: $@" if $@; warn "couldn't do $config_file: $!" unless defined $return; warn "couldn't run $config_file" unless $return; } else { print "Using Default Configuration \n\n"; t %Log_rooms = ( "default" => { 'BM_shutts_south_00' => 1, 'BM_ +shutt_north_00' => 1 }, ); ... package Cybro_Item; ... sub get_extra_rooms_for_log { my($self,$var_name) = @_; my %match=undef; while(($room, $room_hash) = each(%Log_rooms)) { ...
I'd kindly ask for some help,use Cybro_Items;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cannot read hash variable from file as global...
by CountZero (Bishop) on Mar 27, 2009 at 06:57 UTC | |
by Anonymous Monk on Mar 27, 2009 at 10:59 UTC | |
by drench (Beadle) on Mar 27, 2009 at 15:47 UTC | |
|
Re: Cannot read hash variable from file as global...
by Anonymous Monk on Mar 27, 2009 at 03:12 UTC |