in reply to Perl doesn't give error when module is not found 2

The following is wrong:

perl MyModule.pm

To load a module, use

perl -I . -e'use MyModule;'

Replies are listed 'Best First'.
Re^2: Perl doesn't give error when module is not found 2
by soonix (Chancellor) on Mar 27, 2024 at 15:03 UTC
    "wrong" in the sense of "why would anybody do this?", yes, but not "syntactically wrong" or "won't work" - see my other reply

      Can cause problems. They're not equivalent, and the latter is how the module is normally loaded.