Why $1 not work in cygwin?

N

niry

perl -e "while(<>) { print $1 if(/^F MEASURE:\s+([0-9\.]+)$/); }"
with input:
F MEASURE: 0.9343

but the output is:
F MEASURE: 0.9343
not what I expect:
0.9343

and this script did well on my windows and linux, except cygwin
 
B

Bart Lateur

niry said:
perl -e "while(<>) { print $1 if(/^F MEASURE:\s+([0-9\.]+)$/); }"
with input:
F MEASURE: 0.9343

but the output is:
F MEASURE: 0.9343
not what I expect:
0.9343

and this script did well on my windows and linux, except cygwin

But, what shell are you using? I think you're having a shell escape
issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,474
Latest member
AntoniaDea

Latest Threads

Top