jarich, thank you for your reply.

i pasted your code in my $SIG{'__DIE__'} adn here is it.
local $SIG{'__DIE__'} = sub { my $my_today_int = $today_int; my $my_no_call_requested_days = $no_call_requested_days; my $my_i = $i; my $my_user_id = $user_id; my @dump = (); # Just grabbing the values of these so that # strict will cope with them. push @dump, $_[0], ""; push @dump, Dumper($my_today_int, $my_i, $my_user_id), ""; push @dump, Dumper($my_no_call_requested_days), ""; { use strict; my @today = @{$my_no_call_requested_days->{$my_today_int}}; push @dump, "today: " . Dumper(@today), ""; my $ref = $today[$my_i]; push @dump, "ref: " . Dumper($ref), ""; my $employee_id = $ref->{'employee_id'}; push @dump, "employee_id: [$employee_id]", ""; if($employee_id eq $my_user_id) # should be "==" { push @dump, "They are the same!", ""; } } &debug(@dump); };


Here is the output.
Can't use an undefined value as a HASH reference at /usr/local/www/cgi +-bin/kapc/md2/display_md_calendar.cgi line 1534. $VAR1 = 1041483600; $VAR2 = 0; $VAR3 = '0'; $VAR1 = { '1050120000' => [ { 'employee_id' => '34', 'type' => 'Routine' } ], '1049173200' => [ { 'employee_id' => '28', 'type' => 'Routine' } ], '1043211600' => [ { 'employee_id' => '0', 'type' => 'Hospital' }, { 'employee_id' => '34', 'type' => 'Routine' } ], '1043989200' => [ { 'employee_id' => '16', 'type' => 'Routine' }, { 'employee_id' => '10', 'type' => 'Routine' } ], '1043125200' => [ { 'employee_id' => '27', 'type' => 'Routine' } ], '1051329600' => [ { 'employee_id' => '24', 'type' => 'Routine' }, { 'employee_id' => '16', 'type' => 'Routine' } ], '1051243200' => [ { 'employee_id' => '24', 'type' => 'Routine' }, { 'employee_id' => '16', 'type' => 'Routine' } ], '1041483600' => [ { 'employee_id' => '27', 'type' => 'Routine' }, { 'employee_id' => '27', 'type' => 'Routine' } ], '1058932800' => [ { 'employee_id' => '23', 'type' => 'Routine' } ], '1053144000' => [ { 'employee_id' => '20', 'type' => 'Routine' } ], '1043298000' => [ { 'employee_id' => '0', 'type' => 'Routine' } ], '1046149200' => [ { 'employee_id' => '23', 'type' => 'Routine' }, { 'employee_id' => '28', 'type' => 'Routine' } ], '1046322000' => [ { 'employee_id' => '28', 'type' => 'Routine' } ], '1046408400' => [ { 'employee_id' => '10', 'type' => 'Extension' } ], '1048222800' => [ { 'employee_id' => '28', 'type' => 'Routine' }, { 'employee_id' => '10', 'type' => 'Routine' } ], '1045198800' => [ { 'employee_id' => '28', 'type' => 'Routine' }, { 'employee_id' => '13', 'type' => 'Routine' }, { 'employee_id' => '13', 'type' => 'Routine' } ], '1048136400' => [ { 'employee_id' => '28', 'type' => 'Routine' } ], '1042693200' => [ { 'employee_id' => '0', 'type' => 'Routine' } ], '1045285200' => [ { 'employee_id' => '0', 'type' => 'Routine' } ], '104400' => [ { 'employee_id' => '16', 'type' => '-Routine' }, { 'employee_id' => '10', 'type' => '-Routine' }, { 'employee_id' => '28', 'type' => '-Routine' }, { 'employee_id' => '13', 'type' => '-Routine' }, { 'employee_id' => '13', 'type' => '-Routine' }, { 'employee_id' => '10', 'type' => '-Extension' }, { 'employee_id' => '28', 'type' => '-Routine' }, { 'employee_id' => '10', 'type' => '-Routine' }, { 'employee_id' => '24', 'type' => '-Routine' }, { 'employee_id' => '16', 'type' => '-Routine' } ], '18000' => [ { 'employee_id' => '16', 'type' => '-Routine' }, { 'employee_id' => '10', 'type' => '-Routine' }, { 'employee_id' => '28', 'type' => '-Routine' }, { 'employee_id' => '13', 'type' => '-Routine' }, { 'employee_id' => '13', 'type' => '-Routine' }, { 'employee_id' => '10', 'type' => '-Extension' }, { 'employee_id' => '28', 'type' => '-Routine' }, { 'employee_id' => '10', 'type' => '-Routine' }, { 'employee_id' => '24', 'type' => '-Routine' }, { 'employee_id' => '16', 'type' => '-Routine' }, { 'employee_id' => '0', 'type' => '-Routine' }, { 'employee_id' => '34', 'type' => '-Routine' }, { 'employee_id' => '24', 'type' => '-Routine' }, { 'employee_id' => '16', 'type' => '-Routine' }, { 'employee_id' => '20', 'type' => '-Routine' } ], '-154800' => [ { 'employee_id' => '0', 'type' => '-Routine' }, { 'employee_id' => '34', 'type' => '-Routine' }, { 'employee_id' => '24', 'type' => '-Routine' }, { 'employee_id' => '16', 'type' => '-Routine' }, { 'employee_id' => '20', 'type' => '-Routine' } ], '1045717200' => [ { 'employee_id' => '23', 'type' => 'Routine' } ] }; today: $VAR1 = { 'employee_id' => '27', 'type' => 'Routine' }; $VAR2 = + { 'employee_id' => '27', 'type' => 'Routine' }; ref: $VAR1 = { 'employee_id' => '27', 'type' => 'Routine' }; employee_id: [27]


Here is the line 1534 where the script dies.
if (%{@{$no_call_requested_days->{$today_int}}[$i]}->{'employee_id'} = += $user_id)

In reply to Re: Re: Can't use an undefined value as a HASH reference by Anonymous Monk
in thread Can't use an undefined value as a HASH reference by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.