in reply to Problem with inheritance

I did not know that @a = "FOO"; and @a = ("FOO"); were equivalent! What a country.

Replies are listed 'Best First'.
Re^2: Problem with inheritance
by ikegami (Patriarch) on Oct 24, 2007 at 21:07 UTC

    Parens are usually used because "=" has higher precedence than ",".

    >perl -MO=Deparse,-p -e "@a = 1, 2" ((@a = 1), '???'); -e syntax OK >perl -MO=Deparse,-p -e "@a = (1, 2)" (@a = (1, 2)); -e syntax OK

    ('???' is the 2 in void context being optimized away.)

Re^2: Problem with inheritance
by kevinp (Novice) on Oct 24, 2007 at 21:05 UTC
    Thanks - Changed to UserAgent now everything works.