in reply to Re: use 5.005 with perl v5.16.3
in thread use 5.005 with perl v5.16.3

use JSON; is a statement, not a program. What happens if you provide a program to run?

Win8 Strawberry 5.8.9.5 (32) Thu 08/05/2021 14:31:49 C:\@Work\Perl\monks >perl -MJSON -e print(1) 1 Win8 Strawberry 5.8.9.5 (32) Thu 08/05/2021 14:33:13 C:\@Work\Perl\monks >perl -e "use JSON; print(1)" 1 Win8 Strawberry 5.8.9.5 (32) Thu 08/05/2021 14:33:41 C:\@Work\Perl\monks >perl -e "use strict; use warnings; use JSON; print(1)" 1


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^3: use 5.005 with perl v5.16.3
by Anonymous Monk on Aug 05, 2021 at 19:28 UTC

    I suppose it's a matter of semantics ("what constitutes a program?") but I disagree with you. A program consisting of just use JSON; executes a whole bunch of code, any of which could fail for various reasons. That's why the other AM asked.

      ... "what constitutes a program?" .... A program consisting of just use JSON; ...

      It was to answer your question that I gave examples of very simple programs incorporating the use JSON; statement (or possibly other, similar statements) that could actually be run as programs and that might provide useful insight into the root problem.


      Give a man a fish:  <%-{-{-{-<

        All of your examples include code other than use JSON;
        A program can consist of only use JSON;
        — and that could still be a useful test (at least in the opinion of the author of that node, apparently, and I concur).