in reply to Changing dates

Did you run this through use strict; use warnings;? Check the precedence of your operators. This code:

if ($foo == "A"||"B"||"C")

is actually the same as

if (($foo == "A") || ("B") || ("C"))

which should reduce to if (1). Also, you have a $start_day == 01 in every section. == is a comparison, = is an assignment.

--MidLifeXis

Replies are listed 'Best First'.
Re^2: Changing dates
by chromatic (Archbishop) on Dec 17, 2008 at 22:23 UTC
    Did you run this through use strict; use warnings;?

    How would either help in this case? I don't get any errors or warnings about this construct with Perl 5.8.8 or 5.10.0.

      D'oh. Must be the ass-u-me thing. Thought that the $var == 01 at the end of the if blocks would trigger a "useless" something or another. My mistake.

      --MidLifeXis

Re^2: Changing dates
by ITmajor (Beadle) on Dec 18, 2008 at 18:56 UTC
    Also, you have a $start_day == 01 in every section. == is a comparison, = is an assignment.

    thanks for pointing that out.....problem solved