perlquestion
vit
Dear Monks,<br>
I want to match with optional "'" and optional subsequent word
<code>
cat file.txt | perl -ne '{chomp; ($a, $b) = split/\s+/; $s = "$a $b"; next if($s !~ /^\w+\'?\w+?\s+\w+\'?\w+?$/); print "$_\n"}' | wc -l
</code>
I am getting
<code>
bash: syntax error near unexpected token `)'
</code>
Is it something related to sygwin or activesatate Perl I use? Or I am missing something?