I just tried to pass a search pattern starting with $ to less:
less +/'\$l' myfile.pl
and I got
There is no -l option ("less --help" for help)
After reading the manual, I tried the alternate -p-option
less -p'\$l' myfile.pl
and got the same error.
Then I found, that (n.b. the space after -p)
less -p '\$l' myfile.pl
works, i.e. opens the file without error message and jumps to first occurrence of $l.
The long option variant --pattern=$l does not work
less --pattern='\$l' myfile.pl
There is no -l option ("less --help" for help)
whereas space instead of = works
less --pattern '\$l' myfile.pl
This is
less -V
less 458 (POSIX regular expressions)
Copyright (C) 1984-2012 Mark Nudelman
on openSUSE Leap 42.3
Now the question: is this a bug?