http://qs321.pair.com?node_id=11111465

pvfki has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am trying to run a perl command through linux console using filehandle ($_ sign) in order to indicate a file to use when running the command. The commands from the code snippet below are from https://metacpan.org/pod/ntheory

For example, I have the following number in input.txt: 147416345806550029415781910597841 Running with Windows:
>perl -Mntheory=:all -nE "chomp; say is_prime($_);" input.txt 1 >perl -Mntheory=:all -nE "chomp; say length($_);" input.txt 33
Running on Linux however I get:
>perl -Mntheory=:all -nE "chomp; say is_prime($_);" input.txt Parameter 'inputtxt' must be a positive integer at -e line 1, <> line +1. >perl -Mntheory=:all -nE "chomp; say length($_);" input.txt Parameter 'inputtxt' must be a positive integer at -e line 1, <> line +1.
Does anyone know how to fix this? I'm not sure how perl (shell) via Linux works? How do I get the same output as Windows? Thanks for help!