in reply to Use strict.
You are not using perl to execute your scripts. Sounds like you are using a shell. Those messages are not coming from Perl. For a missing module, Perl would have used
Can't locate strict.pm in @INC (@INC contains: ...) at ....
Note that you have a space before "#!" in the second snippet, but they must be the first characters of the file to have their special meaning.
Once you start running your snippets with Perl, you'll still have a problem with the first snippet.
Bareword found where operator expected at ..., near "$use strict" (Missing operator before strict?) syntax error at ..., near "$use strict" Execution of -e aborted due to compilation errors.
Get rid of the "$".
|
|---|