When using listings and breqn, the minus signs (or dashes, according to the unix.SX site then there's some controversy about which it is) disappear from code listing. Here's an example:
\documentclass{article}
\pagestyle{empty}
\usepackage{breqn}
\usepackage{listings}
\begin{document}
\lstset{language=Perl}
\begin{lstlisting}
#! /usr/bin/perl -w
if ($ARGV[0] =~ /^-/) {
print "Option given";
}
\end{lstlisting}
\end{document}
with result:

Changing the order of package loading doesn't help. breqn does warn that it might break other packages, but it would be really useful to have both working. If it helps, the code listings are in appendices so happen after the equations which breqn is meant to help with so I can happily reset anything that got changed.



pdflatexusing the default packages from TeXLive 2010. – Andrew Stacey Dec 09 '10 at 20:01pdflatex, updated MiKTeX 2.8). – lockstep Dec 09 '10 at 20:14listings.sty) and goes downhill from there. I didn't have the time nor inclination to find out more, but just moved to my Mac (which has TL2010) instead. – Harald Hanche-Olsen Dec 09 '10 at 22:13breqn, they come back whenbreqnis removed. In general,breqnshould not be used.breqnmesses with a lot of things, and if you notive whenbreqnis not used those are not being typeset as hyphens but rather as real math minuses, andbreqnmesses with those. – daleif Mar 20 '20 at 10:14