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:Running on Linux however I get:>perl -Mntheory=:all -nE "chomp; say is_prime($_);" input.txt 1 >perl -Mntheory=:all -nE "chomp; say length($_);" input.txt 33
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!>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.
In reply to Linux file handle not working by pvfki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |