Please learn about the shell you're using. cmd.exe does not support multiline commands. You will need to fit the complete command on one line.
Also, cmd.exe does not know about single quotes. You will need to change the surrounding quotes to double quotes. This also means that you will need to change all inner double quotes to qq().
perl -ane "$s = qq(); foreach (@F) { /(\d+)-(\d+)/ and $2 - $1 >= 30 a +nd $s .= qq( $1-$2) }; print qq($F[0]$s\n) if $s" input.txt
In reply to Re: Why this script is not running on windows?
by Corion
in thread Why this script is not running on windows?
by abhikalrt53
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |