<p>I am trying to find all matches in a string that begins with <code>| |</code>.  </p>

<p>I have tried: <code>if ($line =~ m/^\\\|\s\\\|/)</code> which didn't work. </p>

<p>Any ideas?</p>

You are escaping the pipe one time too many, effectively escaping the backslash instead.
```
```
print "YES!" if ($line =~ m/^\|\s\|/);
```
```