in reply to How to find out if an argument is an LVALUE ? (TinyPerl)

Your results look wrong, and your definition of lvalue definitly is.

I tried to reproduce some snippets of your code on my mobile with perl 5.36 and I always get

Modification of a read-only value attempted

Which version of perl are you using?

(Aren't you the guy with that obscure stone age tiny perl?)

Anyway it's very late I'm going to bed now :)

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: How to find out if an argument is an LVALUE ?
by eyepopslikeamosquito (Archbishop) on Nov 09, 2023 at 03:19 UTC

    Aren't you the guy with that obscure stone age tiny perl?

    Yes he was (Perl 5.004 and TinyPerl 5.8 on Windows XP).

    However, he surprised us a week or two ago by asking How do I install a Perl module? on ubuntu 23.04 x64 on an old DELL desktop computer. Though I don't know the status of his new Linux adventure, I'm hoping he took my advice to build the latest perl v5.38 from source. :)

    👁️🍾👍🦟
Re^2: How to find out if an argument is an LVALUE ?
by harangzsolt33 (Deacon) on Nov 09, 2023 at 13:32 UTC
    I'm using TinyPerl 5.8 now. I am surprised that there is such a big difference in how references are created in two distinct Perl versions. I mean 5.8 is not such an ancient version. I would say that Perl 4 is ancient. Nobody uses that anymore. lol
      A proper 5.8 may throw the right warnings.

      But according to the project page is Tiny Perl cutting off a lot of the code in order to condense the size to tiny (sic)

      And did you ever check if the constant/read-only values were really changed?

      Anyway please be kind and tag such posts in the title with Tiny Perl in the future, like the Perl4 and Raku folks do.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      see Wikisyntax for the Monastery

        Okay. I will do that!

      Perl 5.8 is listed as a Legacy version and is now over 20 years old.

      In my mind, that counts as ancient!

      I mean 5.8 is not such an ancient version. I would say that Perl 4 is ancient.

      Perl 4? Why not go all the way back to Perl 1? Now that you have a Linux box, you can build it from source a lot quicker than building a modern perl. Runs a lot faster too, without all those pesky modules slowing things down. ;-)

      👁️🍾👍🦟
        Ubuntu used to come with a system perl already pre installed, not sure about Ubuntu 23.

        I know system perl is not ideal for installing further modules for development, but for checking lvalues it's more than enough.

        On a side note, I recently I managed to break the only terminal installed "gterm" just by installing another python app via apt-get. Talking about the downsides of fiddling with system python.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        see Wikisyntax for the Monastery