in reply to "Use strict" and "Use warnings" not working

perl -v simply prints the current Perl version and quits, which is why you found yourself entering Perl at the shell prompt.

There are a couple options for a Perl CLI (command line interpreter) - Adam Kennedy's Perl::Shell might be one to try.

  • Comment on Re: "Use strict" and "Use warnings" not working