in reply to Exception Error in perl code

[ Reparented from later thread ]

timelocal doesn't like your inputs. It's even nice enough to tell you what they are.

Apparently, @dmy contains two elements, both zero, when used to populate the args of timelocal.

That's surely due to my $t = @match_list; setting $t to the number of elements in @match_list.

This is very straightforward debugging. Your variable doesn't contain what it should, so you backtrack until you find where the program's state differs from your expectations.

As an aside, I wonder why you chose to ignore the warning lc $dmy[1] must have issued.

Update: The above debugging would have taken less time than posting the question in at least three different places. Over the span of 9 days, no less! And you already got an answer 8 days ago! *boggled*

Replies are listed 'Best First'.
Re^2: Exception error in perl code
by jwkrahn (Abbot) on Jun 25, 2009 at 11:37 UTC

    Why would  lc $dmy[1] issue a warning?

      oops, I thought lc(undef) would give a warning, but testing shows otherwise.
Re^2: Exception error in perl code
by Rajsri (Initiate) on Jun 29, 2009 at 05:23 UTC
    Hi ikegami, Thanks for the reply. I am new to perl programming, could you please let me know how to overcome this error. How should i assign @dmy. -Rajini

      You should start by reading my post again, which explains @dmy contains junk because $t contains junk. Fix the latter.