in reply to Re: $a++ allowed by $a-- is not ! why?
in thread $a++ allowed by $a-- is not ! why?

Hello Jeffa,

Thanks for your reply. However, why is the auto-decrement operator not magical in nature?

regards,
Abhishek.
  • Comment on Re: Re: $a++ allowed by $a-- is not ! why?

Replies are listed 'Best First'.
Re: $a++ allowed by $a-- is not ! why?
by Abigail-II (Bishop) on Aug 31, 2003 at 09:39 UTC
    However, why is the auto-decrement operator not magical in nature?

    Suppose it was, what would the following print:

    my $a = "a"; $a --; print $a, "\n";

    Abigail

      It would output "\`\n" if it acted upon the ordinal value.
        It would output "\`\n" if it acted upon the ordinal value.

        But since ++ doesn't act on ordinal values, why should --? Furthermore, what should:

        my $a = "a"; $a --; print $a;

        print on an EBCDIC platform?

        Abigail